Vulnerability · Published Nov 18, 2024 · Assigned by GitHub_M

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

High 7.5

In plain English

A high-severity security flaw in aiohttp from aio-libs. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 48% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)0.6%top 51.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13python-aiohttp3.10.11-1DEBIAN-CVE-2024-52303
Debian:14python-aiohttp3.10.11-1DEBIAN-CVE-2024-52303
PyPIaiohttp3.10.11GHSA-27mf-ghqm-j3j8
PyPIaiohttp3.10.11PYSEC-2026-1096
Ubuntu:22.04:LTSpython-aiohttpno fix listedUBUNTU-CVE-2024-52303
Ubuntu:24.04:LTSpython-aiohttpno fix listedUBUNTU-CVE-2024-52303

Affected products (as reported)

VendorProductVersions
aio-libs aiohttp >= 3.10.6, < 3.10.11

Weakness: CWE-772 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References