{"id":"CVE-2024-52303","summary":"aiohttp memory leak when middleware is enabled when requesting a resource with a non-allowed method","details":"aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. In versions starting with 3.10.6 and prior to 3.10.11, a memory leak can occur when a request produces a MatchInfoError. This was caused by adding an entry to a cache on each request, due to the building of each MatchInfoError producing a unique cache entry. An attacker may be able to exhaust the memory resources of a server by sending a substantial number (100,000s to millions) of such requests. Those who use any middlewares with aiohttp.web should upgrade to version 3.10.11 to receive a patch.","aliases":["GHSA-27mf-ghqm-j3j8"],"modified":"2026-04-20T04:07:56.935041Z","published":"2024-11-18T20:08:15.387Z","related":["CGA-v257-cqc3-wrvf","openSUSE-SU-2024:14556-1"],"database_specific":{"cwe_ids":["CWE-772"],"cna_assigner":"GitHub_M","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/52xxx/CVE-2024-52303.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/52xxx/CVE-2024-52303.json"},{"type":"ADVISORY","url":"https://github.com/aio-libs/aiohttp/security/advisories/GHSA-27mf-ghqm-j3j8"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-52303"},{"type":"FIX","url":"https://github.com/aio-libs/aiohttp/commit/bc15db61615079d1b6327ba42c682f758fa96936"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/aio-libs/aiohttp","events":[{"introduced":"2272c2b952e87048922cb69ce6daa3a7340677c1"},{"fixed":"3e09325e4839117df13fbac301f360edf8d3a0ee"},{"fixed":"bc15db61615079d1b6327ba42c682f758fa96936"}],"database_specific":{"versions":[{"introduced":"3.10.6"},{"fixed":"3.10.11"}]}}],"versions":["v3.10.10","v3.10.11rc0","v3.10.6","v3.10.7","v3.10.8","v3.10.9"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-52303.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"}]}