CVE-2024-23334 aiohttp.web.static(follow_symlinks=True) is vulnerable to directory traversal
Attackers can read arbitrary files on the server when aiohttp static routes are configured with follow_symlinks enabled.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-23334?
CVE-2024-23334 is a medium-severity path traversal vulnerability in Fedoraproject Fedora, published on 29 Jan 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. When using aiohttp as a web server and configuring static routes, it is necessary to specify the root path for static files. Additionally, the option 'follow_symlinks' can be used to determine whether to follow symbolic links outside the static root directory. When 'follow_symlinks' is set to True, there is no validation to check if reading a file is within the root directory. This can lead to directory traversal vulnerabilities, resulting in unauthorized access to arbitrary files on the system, even when symlinks are not present. Disabling follow_symlinks and using a reverse proxy are encouraged mitigations. Version 3.9.2 fixes this issue.
Weakness: CWE-22
Which versions are affected by CVE-2024-23334?
3 open source packages ship an affected version, including aiohttp. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
aiohttp PyPI | From 1.0.5 | 3.9.2 |
aiohttp PyPI | From 1.0.5 | 3.9.2 |
aiohttp PyPI | From 1.0.5 | 3.9.2 |
Linux distribution packages (1)
python-aiohttp openSUSE:Tumbleweed | All versions | 3.9.3-1.1 |
Products include Aiohttp Aiohttp, Fedoraproject Fedora.
How do I fix CVE-2024-23334?
Upgrade aiohttp to 3.9.2 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2024-23334 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-23334 exists.
Public exploit code: 1 Exploit-DB entry, 1 Nuclei template and 15 proofs of concept on GitHub.
Other vulnerabilities in Fedoraproject Fedora
- CVE-2024-52303 aiohttp memory leak when middleware is enabled when requesting a resource with a non-allowed method
- CVE-2025-69223 AIOHTTP's HTTP Parser auto_decompress feature is vulnerable to zip bomb
- CVE-2024-30251 Denial of service when trying to parse malformed POST requests in aiohttp
- CVE-2023-49081 aiohttp's ClientSession is vulnerable to CRLF injection via version
- CVE-2026-22815 AIOHTTP: Uncapped memory usage possible through aiohttp allowing unlimited trailer headers
Sources
Also known as AZL-43552, AZL-44319, CLSA-2026-1788349677, DEBIAN-CVE-2024-23334, ECHO-14a1-a31d-6fee, GHSA-5h86-8mv2-jq9f and 5 more.