{"id":"CVE-2024-42367","published":"2024-08-09T17:25:22Z","modified":"2025-06-09T12:17:50Z","title":"In aiohttp, compressed files as symlinks are not protected from path traversal","vendor":"aio-libs","product":"aiohttp","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0065,"percentile":0.52106,"provenance":"source"},"cwes":[{"id":"CWE-61","name":"UNIX Symbolic Link (Symlink) Following"}],"references":[{"url":"https://github.com/aio-libs/aiohttp/security/advisories/GHSA-jwhx-xcg6-8xhj","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/aio-libs/aiohttp/pull/8653","tags":["x_refsource_MISC"]},{"url":"https://github.com/aio-libs/aiohttp/commit/ce2e9758814527589b10759a20783fb03b98339f","tags":["x_refsource_MISC"]},{"url":"https://github.com/aio-libs/aiohttp/blob/e0ff5246e1d29b7710ab1a2bbc972b48169f1c05/aiohttp/web_fileresponse.py#L177","tags":["x_refsource_MISC"]},{"url":"https://github.com/aio-libs/aiohttp/blob/e0ff5246e1d29b7710ab1a2bbc972b48169f1c05/aiohttp/web_urldispatcher.py#L674","tags":["x_refsource_MISC"]}],"priority":{"score":13.8,"factors":[{"name":"EPSS percentile","points":10.42},{"name":"CVSS severity","points":3.36}]},"vendorSlug":"aio-libs","affectedVersions":[{"vendor":"aio-libs","product":"aiohttp","versions":[">= 3.10.0b1, < 3.10.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-08-09T18:18:15.360284Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"aiohttp","vulnerableRanges":[">=3.10.0b1, <3.10.2"],"patched":["3.10.2"],"from":["GHSA-jwhx-xcg6-8xhj","PYSEC-2026-1108"],"provenance":"source"}],"summary":{"text":"In aiohttp, the path traversal protection for static routes does not cover compressed file variants (.gz or .br) served by the FileResponse class, so symbolic link variants are followed outside the root directory on the 3.10 branch before 3.10.2. An attacker with network access can request such a compressed variant without authentication or user interaction, provided the server uses static routes with follow_symlinks=False (the default) and the relevant symlinked compressed files exist within the served tree.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:44:18Z"},"euvd":{"id":"EUVD-2024-2609","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2024-23829","published":"2024-01-29","fixed":"3.9.2","kev":false},{"cve":"CVE-2024-27306","published":"2024-04-18","fixed":"3.9.4","kev":false},{"cve":"CVE-2024-30251","published":"2024-05-02","fixed":"3.9.4","kev":false},{"cve":"CVE-2024-42367","published":"2024-08-09","fixed":"3.10.2","kev":false},{"cve":"CVE-2024-52303","published":"2024-11-18","fixed":"3.10.11","kev":false},{"cve":"CVE-2024-52304","published":"2024-11-18","fixed":"3.10.11","kev":false,"link":{"from":"CVE-2024-42367","to":"CVE-2024-52304","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:aiohttp","fromFixed":"3.10.2","toFixed":"3.10.11","daysApart":101}]}},{"cve":"CVE-2025-53643","published":"2025-07-14","fixed":"3.12.14","kev":false}],"package":"PyPI:aiohttp"}}