PyPI: aiohttp
CVE-2026-34513
Safety vulnerability ID: SFTY-20260401-61761
Safety legacy ID: pyup.io-91356
Affected versions of the aiohttp package are vulnerable to Denial of Service (DoS) due to an unbounded DNS cache in TCPConnector that grows without limit. When an application issues requests to a large number of distinct hosts, the internal DNS resolution cache accumulates entries indefinitely because no maximum size or eviction policy is enforced. An attacker capable of triggering requests to many unique hostnames can cause steadily increasing memory consumption, ultimately degrading or exhausting available resources on the host system.
Overview
AIOHTTP Affected by Denial of Service (DoS) via Unbounded DNS Cache in TCPConnector
Advisory
Affected versions of the aiohttp package are vulnerable to Denial of Service (DoS) due to an unbounded DNS cache in TCPConnector that grows without limit. When an application issues requests to a large number of distinct hosts, the internal DNS resolution cache accumulates entries indefinitely because no maximum size or eviction policy is enforced. An attacker capable of triggering requests to many unique hostnames can cause steadily increasing memory consumption, ultimately degrading or exhausting available resources on the host system.
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20260401-61761/CVE-2026-34513
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-34513
- https://data.safetycli.com/changelogs/aiohttp/
- https://github.com/advisories/GHSA-hcc4-c3v8-rx92
- https://pypi.org/project/aiohttp
- https://github.com/aio-libs/aiohttp/security/advisories/GHSA-hcc4-c3v8-rx92
- https://github.com/aio-libs/aiohttp/commit/c4d77c3533122be353b8afca8e8675e3b4cbda98
- https://nvd.nist.gov/vuln/detail/CVE-2026-34513
- https://github.com/aio-libs/aiohttp/releases/tag/v3.13.4
- https://github.com/advisories/GHSA-hcc4-c3v8-rx92
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
