CVE-2024-42367
aiohttp: python-aiohttp: Compressed files as symlinks are not protected from path traversal
Overview
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.
Source: OX vulnerability database
Severity
4.8 · MEDIUM
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Weakness: CWE-61
Affected packages · 3
Operating systems · 23 fixes
Red Hat 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 7 | python-aiohttp +1 | investigating |
| 7 (satellite-capsule:el8) | python-aiohttp +1 | investigating |
| 7 (satellite:el8) | python-aiohttp +1 | investigating |
SUSE Linux Enterprise 3 releases · 1 package
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.4 | python311-aiohttp | 3.9.3-150400.10.24.1 | SUSE-SU-2024:3110-1 |
| 15.5 | python311-aiohttp | 3.9.3-150400.10.24.1 | SUSE-SU-2024:3110-1 |
| 15.6 | python311-aiohttp | 3.9.3-150400.10.24.1 | SUSE-SU-2024:3110-1 |
chainguard 1 release · 6 packages
| Release | Package | Fixed in |
|---|---|---|
| kserve | 0.13.1-r3 | |
| py3-cassandra-medusa +1 | 0.22.3-r1 | |
| nemo | 1.23.0-r12 | |
| airflow | 2.9.3-r2 | |
| dask-gateway | 2024.1.0-r9 | |
| checkov | 3.0.34-r1 |
debian 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 12 | python-aiohttp | affected |
| 13 | python-aiohttp | 3.10.3-2 |
| 14 | python-aiohttp | 3.10.3-2 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| python-aiohttp | 3.10.3-2 |
openSUSE 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Tumbleweed | python310-aiohttp +2 | 3.10.5-1.1 | openSUSE-SU-2024:14280-1 |
| Tumbleweed | python313-aiohttp +1 | 3.14.3-1.1 | openSUSE-SU-2026:11467-1 |
wolfi 1 release · 5 packages
| Release | Package | Fixed in |
|---|---|---|
| kserve | 0.13.1-r3 | |
| py3-cassandra-medusa | 0.22.3-r1 | |
| airflow | 2.9.3-r2 | |
| dask-gateway | 2024.1.0-r9 | |
| checkov | 3.0.34-r1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2024-42367
- github.com https://github.com/aio-libs/aiohttp
- github.com https://github.com/aio-libs/aiohttp/blob/e0ff5246e1d29b7710ab1a2bbc972b48169f1c05/aiohttp/web_fileresponse.py#L177
- github.com https://github.com/aio-libs/aiohttp/blob/e0ff5246e1d29b7710ab1a2bbc972b48169f1c05/aiohttp/web_urldispatcher.py#L674
- github.com https://github.com/aio-libs/aiohttp/commit/ce2e9758814527589b10759a20783fb03b98339f
- github.com https://github.com/aio-libs/aiohttp/pull/8653
- github.com https://github.com/aio-libs/aiohttp/security/advisories/GHSA-jwhx-xcg6-8xhj
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2024-42367
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2024-42367
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.