aiohttp.web.static(follow_symlinks=True) is vulnerable to directory traversal
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
aiohttpPyPI | >= 1.0.5, < 3.9.2 | 3.9.2 |
Affected products
28- osv-coords27 versionspkg:apk/chainguard/checkovpkg:apk/chainguard/py3.10-aiohttppkg:apk/chainguard/py3.11-aiohttppkg:apk/chainguard/py3.12-aiohttppkg:apk/chainguard/py3.13-aiohttppkg:apk/chainguard/py3.13-scanner-test-libraries-aiohttppkg:apk/chainguard/py3-aiohttppkg:apk/chainguard/py3-cassandra-medusapkg:apk/chainguard/py3-cassandra-medusa-compatpkg:apk/chainguard/py3-supported-aiohttppkg:apk/wolfi/checkovpkg:apk/wolfi/py3.10-aiohttppkg:apk/wolfi/py3.11-aiohttppkg:apk/wolfi/py3.12-aiohttppkg:apk/wolfi/py3.13-aiohttppkg:apk/wolfi/py3-aiohttppkg:apk/wolfi/py3-cassandra-medusapkg:apk/wolfi/py3-cassandra-medusa-compatpkg:apk/wolfi/py3-supported-aiohttppkg:pypi/aiohttppkg:rpm/opensuse/python-aiohttp&distro=openSUSE%20Leap%2015.5pkg:rpm/opensuse/python-aiohttp&distro=openSUSE%20Tumbleweedpkg:rpm/suse/python-aiohttp&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-ESPOSpkg:rpm/suse/python-aiohttp&distro=SUSE%20Linux%20Enterprise%20High%20Performance%20Computing%2015%20SP4-LTSSpkg:rpm/suse/python-aiohttp&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Python%203%2015%20SP5pkg:rpm/suse/python-aiohttp&distro=SUSE%20Linux%20Enterprise%20Server%2015%20SP4-LTSSpkg:rpm/suse/python-aiohttp&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2015%20SP4
< 3.0.34-r1+ 26 more
- (no CPE)range: < 3.0.34-r1
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 0.0.1-r1
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 0.17.2-r1
- (no CPE)range: < 0.17.2-r1
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.0.34-r1
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: < 0.17.2-r1
- (no CPE)range: < 0.17.2-r1
- (no CPE)range: < 3.9.3-r0
- (no CPE)range: >= 1.0.5, < 3.9.2
- (no CPE)range: < 3.9.3-150400.10.14.1
- (no CPE)range: < 3.9.3-1.1
- (no CPE)range: < 3.9.3-150400.10.14.1
- (no CPE)range: < 3.9.3-150400.10.14.1
- (no CPE)range: < 3.9.3-150400.10.14.1
- (no CPE)range: < 3.9.3-150400.10.14.1
- (no CPE)range: < 3.9.3-150400.10.14.1
Patches
Vulnerability mechanics
References
13- github.com/advisories/GHSA-5h86-8mv2-jq9fghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-23334ghsaADVISORY
- github.com/aio-libs/aiohttp/commit/1c335944d6a8b1298baf179b7c0b3069f10c514bghsax_refsource_MISCWEB
- github.com/aio-libs/aiohttp/pull/8079ghsax_refsource_MISCWEB
- github.com/aio-libs/aiohttp/pull/8079/filesghsaWEB
- github.com/aio-libs/aiohttp/security/advisories/GHSA-5h86-8mv2-jq9fghsax_refsource_CONFIRMWEB
- github.com/pypa/advisory-database/tree/main/vulns/aiohttp/PYSEC-2024-24.yamlghsaWEB
- lists.debian.org/debian-lts-announce/2025/02/msg00002.htmlghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ICUOCFGTB25WUT336BZ4UNYLSZOUVKBDghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XXWVZIVAYWEBHNRIILZVB3R3SDQNNAA7ghsaWEB
- www.exploit-db.com/exploits/52474ghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ICUOCFGTB25WUT336BZ4UNYLSZOUVKBD/mitre
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XXWVZIVAYWEBHNRIILZVB3R3SDQNNAA7/mitre
News mentions
0No linked articles in our index yet.