Memory Leak Vulnerability in aiohttp Package: CVE-2024-52303

python-aiohttp Updated 02 Oct 2025

Summary

18/11/2024
N/A
Yes i
Unrated
Not published

CVE-2024-52303: aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. Affects python-aiohttp across 2 version ranges.

< 3.10.11-1 < bc15db61615079d1b6327ba42c682f758fa96936

Fixed in 3.10.11-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

aiohttp is an asynchronous HTTP client/server framework designed for asyncio and Python, enabling developers to build efficient web applications. It supports both client and server-side operations, making it versatile for various web-related tasks. However, certain versions of aiohttp are susceptible to a memory leak issue that can severely impact server performance.

Vulnerability Detail

In aiohttp versions 3.10.6 to 3.10.10, a memory leak can occur when a request results in a MatchInfoError. This issue arises because each request generates a unique cache entry, leading to excessive memory consumption. An attacker could exploit this vulnerability by sending a large volume of requests, potentially exhausting the server's memory resources and causing denial of service.

How To Fix

Minimum fixed version

3.10.11-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-aiohttp

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Currently, there are no specific workarounds mentioned for this vulnerability other than upgrading to the patched version. However, limiting the number of requests from untrusted sources can help mitigate the risk temporarily.

Conclusion

The CVE-2024-52303 vulnerability in aiohttp poses a significant risk due to its potential to exhaust server memory through repeated requests. It is crucial for users of affected versions to upgrade to version 3.10.11 or later to mitigate this risk. Additionally, utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for python-aiohttp →

Share this vulnerability

FAQ

CVE-2024-52303 is a vulnerability in the aiohttp package that can lead to a memory leak when a request produces a MatchInfoError.

Versions of aiohttp starting from 3.10.6 up to 3.10.10 are affected by this vulnerability.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor for open-source vulnerabilities without requiring installation.

If immediate upgrading is not possible, consider implementing rate limiting on incoming requests to reduce the risk of exploitation.

Yes, you can use Vulert, which monitors and alerts in real-time for open-source vulnerabilities using just a manifest file like package-lock.json.

Related vulnerabilities

Recent vulnerabilities recorded for python-aiohttp.

How To Fix

Minimum fixed version

3.10.11-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python-aiohttp

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback