{"id":"CVE-2024-52303","aliases":["CVE-2024-52303","GHSA-27mf-ghqm-j3j8","PYSEC-2026-1096"],"related":[],"kind":"vulnerability","state":"published","title":"aiohttp memory leak when middleware is enabled when requesting a resource with a non-allowed method","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nA 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.\n\n### Impact\n\nIf the user is making use of any middlewares with `aiohttp.web` then it is advisable to upgrade immediately.\n\nAn attacker may be able to exhaust the memory resources of a server by sending a substantial number (100,000s to millions) of such requests.\n\n-----\n\nPatch: https://github.com/aio-libs/aiohttp/commit/bc15db61615079d1b6327ba42c682f758fa96936","format":"markdown","source":"ghsa"},{"lang":"es","text":"aiohttp es un framework de trabajo de cliente/servidor HTTP asincrónico para asyncio y Python. En las versiones a partir de la 3.10.6 y anteriores a la 3.10.11, puede producirse una pérdida de memoria cuando una solicitud produce un MatchInfoError. Esto se debía a que se añadía una entrada a una memoria caché en cada solicitud, debido a que la creación de cada MatchInfoError producía una entrada de memoria caché única. Un atacante podría agotar los recursos de memoria de un servidor enviando una cantidad sustancial (entre cientos y millones) de dichas solicitudes. Quienes utilicen cualquier middleware con aiohttp.web deberían actualizar a la versión 3.10.11 para recibir un parche.","source":"nvd"}],"published":"2024-11-18T20:08:15.387Z","modified":"2026-09-10T03:50:20.382Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"}],"cwes":["CWE-772"],"affected":[{"ranges":[{"version":">= 3.10.6, < 3.10.11","status":"affected"}],"vendor":"aio-libs","product":"aiohttp","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"3.10.6","fixed":"3.10.11","status":"affected"}],"vendor":"aiohttp","product":"aio-libs","cpe":"cpe:2.3:a:aiohttp:aio-libs:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"3.10.6","status":"affected","fixed":"3.10.11"}],"ecosystem":"PyPI","package":"aiohttp","purl":"pkg:pypi/aiohttp","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"3.10.6","fixed":"3.10.11"}],"vendor":"aiohttp","product":"aiohttp","cpe":"cpe:2.3:a:aiohttp:aiohttp:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"3.10.6","status":"affected","fixed":"3.10.11"}],"ecosystem":"PyPI","package":"aiohttp","purl":"pkg:pypi/aiohttp","source":"pysec"}],"references":[{"url":"https://github.com/aio-libs/aiohttp/security/advisories/GHSA-27mf-ghqm-j3j8","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/aio-libs/aiohttp/commit/bc15db61615079d1b6327ba42c682f758fa96936","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-52303","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/aio-libs/aiohttp","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/aiohttp","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-27mf-ghqm-j3j8","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2024-11-19T14:39:25.327Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-52303","url":"https://www.cve.org/CVERecord?id=CVE-2024-52303","licence":"CVE Terms of Use","modified":"2024-11-19T14:45:27.044Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-27mf-ghqm-j3j8","url":"https://github.com/advisories/GHSA-27mf-ghqm-j3j8","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:20.382Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-52303","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-52303","licence":"Public domain","modified":"2026-06-17T08:06:58.483Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1096","url":"https://osv.dev/vulnerability/PYSEC-2026-1096","licence":"CC-BY-4.0","modified":"2026-07-07T17:46:18.681Z"}],"updatedAt":"2026-11-25T22:58:48.392Z","epss":{"score":0.00591,"percentile":0.49634,"date":"2026-12-01T12:00:22.000Z"}}