@@ -59,6 +59,8 @@ def test_extract_advisories_from_page():
5959 'href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-30639" '
6060 'rel="nofollow">CVE-2021-30639</a></p>' ,
6161 "<p>An error introduced as part of a change to improve " "error handling.</p>" ,
62+ "<o>Applications that do not use non-blocking I/O are "
63+ "not exposed to this vulnerability.</o>" ,
6264 "<p>This was fixed with commit\n "
6365 " <a "
6466 'href="https://github.com/apache/tomcat/commit/b59099e4ca501a039510334ebe1024971cd6f959">b59099e4</a>.</p>' ,
@@ -200,7 +202,29 @@ def test_extract_advisories_from_page_with_multiple_groups():
200202 "The issue was made public\n "
201203 " on 1 March 2021.</p>" ,
202204 "<p>Affects: 10.0.0-M1 to 10.0.0</p>" ,
203- ]
205+ ],
206+ [
207+ "<p><strong>Important: Request mix-up with "
208+ "h2c</strong>\n "
209+ "<a "
210+ 'href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25122" '
211+ 'rel="nofollow">CVE-2021-25122</a></p>' ,
212+ "<p>When responding to new h2c connection requests, "
213+ "Apache Tomcat could\n "
214+ " duplicate request headers and a limited amount of "
215+ "request body from one\n "
216+ " request to another meaning user A and user B could "
217+ "both see the results of\n "
218+ " user A's request.</p>" ,
219+ "<p>This was fixed with commit\n "
220+ " <a "
221+ 'href="https://github.com/apache/tomcat/commit/dd757c0a893e2e35f8bc1385d6967221ae8b9b9b">dd757c0a</a>.</p>' ,
222+ "<p>This issue was identified by the Apache Tomcat "
223+ "Security team on 11\n "
224+ " January 2021. The issue was made public on 1 "
225+ "March 2021.</p>" ,
226+ "<p>Affects: 10.0.0-M1 to 10.0.0</p>" ,
227+ ],
204228 ],
205229 "fixed_versions" : ["10.0.2" ],
206230 },
@@ -232,11 +256,40 @@ def test_extract_advisories_from_page_with_multiple_groups():
232256 " on 26 October 2020. The issue was made public "
233257 "on 14 January 2021.</p>" ,
234258 "<p>Affects: 10.0.0-M1 to 10.0.0-M9</p>" ,
235- ]
259+ ],
260+ [
261+ "<p><strong>Moderate: HTTP/2 request header "
262+ "mix-up</strong>\n "
263+ "<a "
264+ 'href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-17527" '
265+ 'rel="nofollow">CVE-2020-17527</a></p>' ,
266+ "<p>While investigating issue <a "
267+ 'href="https://bz.apache.org/bugzilla/show_bug.cgi?id=64830">64830</a> '
268+ "it was discovered that Apache\n "
269+ " Tomcat could re-use an HTTP request header "
270+ "value from the previous stream\n "
271+ " received on an HTTP/2 connection for the "
272+ "request associated with the\n "
273+ " subsequent stream. While this would most likely "
274+ "lead to an error and the\n "
275+ " closure of the HTTP/2 connection, it is "
276+ "possible that information could\n "
277+ " leak between requests.\n "
278+ " </p>" ,
279+ "<p>This was fixed with commit\n "
280+ " <a "
281+ 'href="https://github.com/apache/tomcat/commit/8d2fe6894d6e258a6d615d7f786acca80e6020cb">8d2fe689</a>.</p>' ,
282+ "<p>This issue was identified by the Apache Tomcat "
283+ "Security team on 10\n "
284+ " November 2020. The issue was made public on 3 "
285+ "December 2020.</p>" ,
286+ "<p>Affects: 10.0.0-M1 to 10.0.0-M9</p>" ,
287+ ],
236288 ],
237289 "fixed_versions" : ["10.0.0-M10" ],
238290 },
239291 ]
292+
240293 results = extract_advisories_from_page (page )
241294 results = [d .to_dict () for d in results ]
242295 assert results == expected
0 commit comments