4.8medium
In aiohttp, compressed files as symlinks are not protected from path traversal
- Severity
- 4.8medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.79% (higher than 53% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-jwhx-xcg6-8xhjPYSEC-2026-1108
Description
aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. In versions on the 3.10 branch prior to version 3.10.2, static routes which contain files with compressed variants (`.gz` or `.br` extension) are vulnerable to path traversal outside the root directory if those variants are symbolic links. 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 the `Path.stat()` and `Path.open()` to send the file. Version 3.10.2 contains a patch for the issue.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| aio-libs aiohttp | >= 3.10.0b1, < 3.10.2 | CVE List |
| aiohttp (PyPI) | from 3.10.0b1 before 3.10.2 | GitHub Advisory Database, PyPA Advisory Database |
| aiohttp aiohttp | from 3.10.0 before 3.10.2 | NVD |
All scores
| GitHub_M | 4.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
| GitHub | 4.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N |
| NVD | 4.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
| PyPA Advisory Database | 4.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N |
| PyPA Advisory Database | Not scored CVSS:4.0 | CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. In versions on the 3.10 branch prior to version 3.10.2, static routes which contain files with compressed variants (`.gz` or `.br` extension) are vulnerable to path traversal outside the root directory if those variants are symbolic links. 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 the `Path.stat()` and `Path.open()` to send the file. Version 3.10.2 contains a patch for the issue.
GitHub Advisory Database
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.
NVD (es)
aiohttp es un framework cliente/servidor HTTP asíncrono para asyncio y Python. Antes de la versión 3.10.2, las rutas estáticas que contienen archivos con variantes comprimidas (extensión `.gz` o `.br`) son vulnerables al path traversal fuera del directorio raíz si esas variantes son enlaces simbólicos. El servidor protege las rutas estáticas contra el path traversal fuera del directorio raíz cuando `follow_symlinks=False` (predeterminado). Para ello, resuelve la URL solicitada en una ruta absoluta y luego verifica esa ruta en relación con la raíz. Sin embargo, estas comprobaciones no se realizan cuando se buscan variantes comprimidas en la clase `FileResponse`, y los enlaces simbólicos se siguen automáticamente al realizar `Path.stat()` y `Path.open()` para enviar el archivo. La versión 3.10.2 contiene un parche para el problema.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-42367 changed 2025-06-09 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jwhx-xcg6-8xhj changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-42367 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1108 changed 2026-07-07 | CC-BY-4.0 |