CVE-2024-23334aiohttp.web.static(follow_symlinks=True) is vulnerable to directory traversal
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.
What to do
Likely to be exploited: EPSS gives a 26% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
Fixed builds are available from Alpine, Debian, PyPI, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | python-aiohttp | Fix pending | UBUNTU-CVE-2024-23334 | |
| Ubuntu 26.04 | python-aiohttp | Fix pending | UBUNTU-CVE-2024-23334 | |
| Ubuntu 25.10 | python-aiohttp | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-23334 | |
| Ubuntu 24.04 | python-aiohttp | Fixed | 3.9.1-1ubuntu0.1 | UBUNTU-CVE-2024-23334 |
| Ubuntu 22.04 | python-aiohttp | Fixed | 3.8.1-4ubuntu0.2 | UBUNTU-CVE-2024-23334 |
| Ubuntu 20.04 | python-aiohttp | Fix pending | 3.6.2-1ubuntu1+esm3 (Ubuntu Pro) | UBUNTU-CVE-2024-23334 |
| Ubuntu 18.04 | python-aiohttp | Fix pending | 3.0.1-1ubuntu0.1~esm4 (Ubuntu Pro) | UBUNTU-CVE-2024-23334 |
| Ubuntu 16.04 | python-aiohttp | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-23334 | |
| Debian 14 | python-aiohttp | Fixed | 3.9.5-1 | DEBIAN-CVE-2024-23334 |
| Debian 13 | python-aiohttp | Fixed | 3.9.5-1 | DEBIAN-CVE-2024-23334 |
| Debian 12 | python-aiohttp | Fixed | 3.8.4-1+deb12u1 | DEBIAN-CVE-2024-23334 |
| Alpine Linux 3.24 | py3-aiohttp | Fixed | 3.9.3-r0 | ALPINE-CVE-2024-23334 |
| Alpine Linux 3.23 | py3-aiohttp | Fixed | 3.9.3-r0 | ALPINE-CVE-2024-23334 |
| Alpine Linux 3.22 | py3-aiohttp | Fixed | 3.9.3-r0 | ALPINE-CVE-2024-23334 |
| Alpine Linux 3.21 | py3-aiohttp | Fixed | 3.9.3-r0 | ALPINE-CVE-2024-23334 |
| Alpine Linux 3.20 | py3-aiohttp | Fixed | 3.9.3-r0 | ALPINE-CVE-2024-23334 |
| PyPI library | aiohttp | Fixed | 3.9.2 | PYSEC-2024-24 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- aio-libs aiohttp: affected: < 3.9.2
References
- https://github.com/aio-libs/aiohttp/security/advisories/GHSA-5h86-8mv2-jq9f
- https://github.com/aio-libs/aiohttp/pull/8079
- https://github.com/aio-libs/aiohttp/commit/1c335944d6a8b1298baf179b7c0b3069f10c514b
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XXWVZIVAYWEBHNRIILZVB3R3SDQNNAA7/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ICUOCFGTB25WUT336BZ4UNYLSZOUVKBD/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.