CVE-2024-52303
aiohttp: aiohttp memory leak when middleware is enabled when requesting a resource with a non-allowed method
Overview
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.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness: CWE-772
Affected packages · 1
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| PyPI | aiohttp | >=3.10.6, <3.10.11 | 3.10.11 |
Open a package to see all its vulnerabilities.
Operating systems · 10 fixes
chainguard 1 release · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| airflow | 2.10.3-r2 | |
| py3-aiohttp | 3.10.11-r0 | |
| checkov | 3.2.432-r0 |
debian 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 13 | python-aiohttp | 3.10.11-1 |
| 14 | python-aiohttp | 3.10.11-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| python-aiohttp | 3.10.11-1 |
openSUSE 1 release · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | python310-aiohttp +3 | 3.11.9-1.1 | openSUSE-SU-2024:14556-1 |
wolfi 1 release · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| airflow | 2.10.3-r2 | |
| py3-aiohttp | 3.10.11-r0 | |
| checkov | 3.2.432-r0 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2024-52303
- github.com https://github.com/aio-libs/aiohttp
- github.com https://github.com/aio-libs/aiohttp/commit/bc15db61615079d1b6327ba42c682f758fa96936
- github.com https://github.com/aio-libs/aiohttp/security/advisories/GHSA-27mf-ghqm-j3j8
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2024-52303
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2024-52303
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.