Patchfirst
CVE-2024-23334 Public exploit Medium · 5.9 EPSS 76.9%

aiohttp.web.static(follow_symlinks=True) is vulnerable to directory traversal

Fix:upgrade aiohttp to 3.9.2 or later Details ↓

aio-libs · aiohttp

Summary

A directory traversal flaw in aiohttp's static file handler, aiohttp.web.static with follow_symlinks=True, lets files outside the configured static root be read when that option is enabled. An unauthenticated remote attacker with network access can exploit it without user interaction, provided the server is configured with follow_symlinks set to True and serves static routes.

Official description · CVE.org

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.

Breakdown
76.3 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 46 days after disclosure. Public exploit code (PoC-in-GitHub) appeared 30 days after disclosure.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+30 days
  3. First seen exploitedVulnCheck KEV evidence+46 days

See the family tree

3 related vulnerabilities in the same code over 23 months. The latest fix listed for aiohttp is 3.9.4.

Same bug familyLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. This CVECVE-2024-23334aiohttp.web.static(follow_symlinks=True) is vulnerable to…29 Jan 2024
  2. relatedMedium

    Why these are linked:

    CVE-2024-27306aiohttp vulnerable to XSS on index pages for static file…18 Apr 2024
  3. relatedMedium

    Why these are linked:

    CVE-2025-69226AIOHTTP allows for a brute-force leak of internal static filepath…5 Jan 2026

Fixes in aiohttpPyPI package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 3.8.6CVE-2023-4762714 Nov 2023
  2. 3.9.0CVE-2023-4908229 Nov 2023
  3. 3.9.0CVE-2023-4908130 Nov 2023
  4. 3.9.2CVE-2024-2333429 Jan 2024
  5. 3.9.2CVE-2024-2382929 Jan 2024
  6. 3.9.4CVE-2024-2730618 Apr 2024
  7. 3.9.4CVE-2024-302512 May 2024Latest listed

Affected versions and fixes

as published in the CVE record

aio-libs aiohttp

Affected: < 3.9.2

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: aiohttp.

Upgrade to 3.9.2 or later

pippip install "aiohttp>=3.9.2"

The first fix for CVE-2024-23334. No other CVE tracked by Patchfirst affects this package.

Affected versions

If you runUpgrade to
1.0.5 up to 3.9.23.9.2

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

References

7 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close