In aiohttp, compressed files as symlinks are not protected from path traversal
Summary
Static routes which contain files with compressed variants (.gz or .br extension) were vulnerable to path traversal outside the root directory if those variants are symbolic links.
Details
The server protects static routes from path traversal outside the root directory when follow_symlinks=False (default). It does this by resolving the requested URL to an absolute path and then checking that path relative to the root. However, these checks are not performed when looking for compressed variants in the FileResponse class, and symbolic links are then automatically followed when performing Path.stat() and Path.open() to send the file.
Impact
Servers with static routes that contain compressed variants as symbolic links, pointing outside the root directory, or that permit users to upload or create such links, are impacted.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | aiohttp | >= 3.10.0b1, < 3.10.2 | 3.10.2 |
References
- https://github.com/aio-libs/aiohttp/security/advisories/GHSA-jwhx-xcg6-8xhj
- https://nvd.nist.gov/vuln/detail/CVE-2024-42367
- https://github.com/aio-libs/aiohttp/pull/8653
- https://github.com/aio-libs/aiohttp/commit/ce2e9758814527589b10759a20783fb03b98339f
- https://github.com/aio-libs/aiohttp
- https://github.com/aio-libs/aiohttp/blob/e0ff5246e1d29b7710ab1a2bbc972b48169f1c05/aiohttp/web_fileresponse.py#L177
- https://github.com/aio-libs/aiohttp/blob/e0ff5246e1d29b7710ab1a2bbc972b48169f1c05/aiohttp/web_urldispatcher.py#L674
- https://pypi.org/project/aiohttp
- https://github.com/advisories/GHSA-jwhx-xcg6-8xhj
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N- Weakness (CWE)
CWE-61- Platform
- Python (PyPI)
- Package
aiohttp- Disclosed
- 09.08.2024
- Updated
- 11.10.2026 15:17
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-1108 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-jwhx-xcg6-8xhj - CC BY 4.0
Vulnerability history: aiohttp
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 55
- First → latest
- 02.2021 10.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 7
- Medium 29
- Low 19
Disclosures per year
- 2021: 1
- 2022: 0
- 2023: 6
- 2024: 7
- 2025: 1
- 2026: 40
-
In aiohttp, compressed files as symlinks are not protected from path traversal this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.