CVE-2024-52303

aiohttp memory leak when middleware is enabled when requesting a resource with a non-allowed method

Published Nov 18, 2024 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2024-3176 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.
Github GHSA Github GHSA GHSA-27mf-ghqm-j3j8 aiohttp has a memory leak when middleware is enabled when requesting a resource with a non-allowed method
History
Type Values Removed Values Added
First Time appeared Aiohttp aiohttp
CPEs cpe:2.3:a:aiohttp:aiohttp:*:*:*:*:*:*:*:*
Vendors & Products Aiohttp aiohttp
Type Values Removed Values Added
First Time appeared Aiohttp
Aiohttp aio-libs
CPEs cpe:2.3:a:aiohttp:aio-libs:*:*:*:*:*:*:*:*
Vendors & Products Aiohttp
Aiohttp aio-libs
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title aiohttp memory leak when middleware is enabled when requesting a resource with a non-allowed method
Weaknesses CWE-772
References
Metrics cvssV4_0

{'score': 8.7, '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 19, 2024, 2:45 PM
Reserved
Nov 6, 2024, 7:00 PM
Status
Analyzed
Published
Nov 18, 2024, 8:15 PM
Modified
Jun 17, 2026, 8:06 AM
Severity
Important
Public date
Nov 18, 2024, 8:08 PM