# CVE-2024-52303: aiohttp memory leak when middleware is enabled when requesting a resource with a non-allowed method

- Severity: High 8.7 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.59%, higher than 49% of CVEs (2026-12-01)
- Published: 2024-11-18T20:08:15.387Z
- Modified: 2026-09-10T03:50:20.382Z
- Also known as: GHSA-27mf-ghqm-j3j8, PYSEC-2026-1096
- Weaknesses: CWE-772
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- aio-libs aiohttp: >= 3.10.6, < 3.10.11
- aiohttp aio-libs: from 3.10.6 before 3.10.11
- aiohttp (PyPI): from 3.10.6 before 3.10.11
- aiohttp aiohttp: from 3.10.6 before 3.10.11

## Every score

- GitHub_M: CVSS:4.0 8.7 High `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`
- CISA-ADP: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 Medium `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`
- PyPA Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- PyPA Advisory Database: CVSS:4.0 `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`

## References

- <https://github.com/aio-libs/aiohttp/security/advisories/GHSA-27mf-ghqm-j3j8> (vendor-advisory, web)
- <https://github.com/aio-libs/aiohttp/commit/bc15db61615079d1b6327ba42c682f758fa96936> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-52303> (advisory)
- <https://github.com/aio-libs/aiohttp> (package)
- <https://pypi.org/project/aiohttp> (package)
- <https://github.com/advisories/GHSA-27mf-ghqm-j3j8> (advisory)

## Sources

- CVE List: [CVE-2024-52303](https://www.cve.org/CVERecord?id=CVE-2024-52303), CVE Terms of Use, modified 2024-11-19
- GitHub Advisory Database: [GHSA-27mf-ghqm-j3j8](https://github.com/advisories/GHSA-27mf-ghqm-j3j8), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-52303](https://nvd.nist.gov/vuln/detail/CVE-2024-52303), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1096](https://osv.dev/vulnerability/PYSEC-2026-1096), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2024-52303 · Whole record: https://cve.day/CVE-2024-52303.json · Rebuilt by cve.day 2026-11-25T22:58:48.392Z
