CVE-2024-23334
aiohttp.web.static(follow_symlinks=True) is vulnerable to directory traversal
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
8Exploited in Wild
-Decision
Descriptions
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.
aiohttp es un framework cliente/servidor HTTP asíncrono para asyncio y Python. Cuando se utiliza aiohttp como servidor web y se configuran rutas estáticas, es necesario especificar la ruta raíz para los archivos estáticos. Además, la opción 'follow_symlinks' se puede utilizar para determinar si se deben seguir enlaces simbólicos fuera del directorio raíz estático. Cuando 'follow_symlinks' se establece en Verdadero, no hay validación para verificar si la lectura de un archivo está dentro del directorio raíz. Esto puede generar vulnerabilidades de directory traversal, lo que resulta en acceso no autorizado a archivos arbitrarios en el sistema, incluso cuando no hay enlaces simbólicos presentes. Se recomiendan como mitigaciones deshabilitar follow_symlinks y usar un proxy inverso. La versión 3.9.2 soluciona este problema.
A flaw was found in aiohttp. 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 a given file path is within the root directory. This issue can lead to a directory traversal vulnerability, resulting in unauthorized access to arbitrary files on the system, even when symlinks are not present.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2024-01-15 CVE Reserved
- 2024-01-29 CVE Published
- 2024-02-29 First Exploit
- 2024-08-01 CVE Updated
- 2024-11-01 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
CWE
- CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
CAPEC
References (14)
URL | Date | SRC |
---|---|---|
https://github.com/jhonnybonny/CVE-2024-23334 | 2024-03-19 | |
https://github.com/ox1111/CVE-2024-23334 | 2024-02-29 | |
https://github.com/binaryninja/CVE-2024-23334 | 2024-06-17 | |
https://github.com/sxyrxyy/aiohttp-exploit-CVE-2024-23334-certstream | 2024-03-18 | |
https://github.com/z3rObyte/CVE-2024-23334-PoC | 2024-03-19 | |
https://github.com/s4botai/CVE-2024-23334-PoC | 2024-09-08 | |
https://github.com/wizarddos/CVE-2024-23334 | 2024-10-20 | |
https://github.com/aio-libs/aiohttp/security/advisories/GHSA-5h86-8mv2-jq9f | 2024-08-01 |
URL | Date | SRC |
---|---|---|
https://github.com/aio-libs/aiohttp/commit/1c335944d6a8b1298baf179b7c0b3069f10c514b | 2024-02-09 | |
https://github.com/aio-libs/aiohttp/pull/8079 | 2024-02-09 |
URL | Date | SRC |
---|---|---|
https://access.redhat.com/security/cve/CVE-2024-23334 | 2024-04-23 | |
https://bugzilla.redhat.com/show_bug.cgi?id=2261887 | 2024-04-23 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Aiohttp Search vendor "Aiohttp" | Aiohttp Search vendor "Aiohttp" for product "Aiohttp" | >= 1.0.5 < 3.9.2 Search vendor "Aiohttp" for product "Aiohttp" and version " >= 1.0.5 < 3.9.2" | - |
Affected
| ||||||
Fedoraproject Search vendor "Fedoraproject" | Fedora Search vendor "Fedoraproject" for product "Fedora" | 39 Search vendor "Fedoraproject" for product "Fedora" and version "39" | - |
Affected
|