# CVE-2024-23334: aiohttp.web.static(follow_symlinks=True) is vulnerable to directory traversal

- Severity: Medium 5.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 26.3%, higher than 98% of CVEs (2026-11-30)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2024-01-29T22:31:03.000Z
- Modified: 2026-09-10T03:50:04.835Z
- Also known as: GHSA-5h86-8mv2-jq9f, PYSEC-2024-24
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- aio-libs aiohttp: < 3.9.2
- aiohttp (PyPI): from 1.0.5 before 3.9.2; before 1c335944d6a8b1298baf179b7c0b3069f10c514b
- aiohttp aiohttp: from 1.0.5 before 3.9.2
- fedoraproject fedora: 39

## Every score

- GitHub_M: CVSS:3.1 5.9 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 5.9 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- PyPA Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/aio-libs/aiohttp/security/advisories/GHSA-5h86-8mv2-jq9f> (exploit, advisory, mitigation, vendor-advisory, web)
- <https://www.exploit-db.com/exploits/52474> (exploit, web)
- <https://github.com/aio-libs/aiohttp/pull/8079> (fix, patch, web)
- <https://github.com/aio-libs/aiohttp/commit/1c335944d6a8b1298baf179b7c0b3069f10c514b> (fix, patch, web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XXWVZIVAYWEBHNRIILZVB3R3SDQNNAA7/> (article, mailing-list)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ICUOCFGTB25WUT336BZ4UNYLSZOUVKBD/>
- <https://lists.debian.org/debian-lts-announce/2025/02/msg00002.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-23334> (advisory)
- <https://github.com/aio-libs/aiohttp/pull/8079/files> (web)
- <https://github.com/aio-libs/aiohttp> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/aiohttp/PYSEC-2024-24.yaml> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ICUOCFGTB25WUT336BZ4UNYLSZOUVKBD> (web)
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XXWVZIVAYWEBHNRIILZVB3R3SDQNNAA7> (web)

## Sources

- CVE List: [CVE-2024-23334](https://www.cve.org/CVERecord?id=CVE-2024-23334), CVE Terms of Use, modified 2026-02-04
- GitHub Advisory Database: [GHSA-5h86-8mv2-jq9f](https://github.com/advisories/GHSA-5h86-8mv2-jq9f), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2024-23334](https://nvd.nist.gov/vuln/detail/CVE-2024-23334), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2024-24](https://osv.dev/vulnerability/PYSEC-2024-24), CC-BY-4.0, modified 2024-02-05

---

Page: https://cve.day/CVE-2024-23334 · Whole record: https://cve.day/CVE-2024-23334.json · Rebuilt by cve.day 2026-11-25T22:58:36.427Z
