CVE-2024-42367

In aiohttp, compressed files as symlinks are not protected from path traversal

Description

aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. 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.

Category

4.8
CVSS
Severity: Medium
CVSS 3.1 •
EPSS 0.19%
Affected: aio-libs aiohttp
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-42367?
CVE-2024-42367 has been scored as a medium severity vulnerability.
How to fix CVE-2024-42367?
To fix CVE-2024-42367, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2024-42367 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2024-42367 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-42367?
CVE-2024-42367 affects aio-libs aiohttp.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.