#VU85886 Path traversal in aiohttp


Published: 2024-03-22 | Updated: 2024-04-05

Vulnerability identifier: #VU85886

Vulnerability risk: High

CVSSv3.1: 7.2 [CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:H/RL:O/RC:C]

CVE-ID: CVE-2024-23334

CWE-ID: CWE-22

Exploitation vector: Network

Exploit availability: Yes

Vulnerable software:
aiohttp
Other software / Other software solutions

Vendor: aio-libs

Description

The vulnerability allows a remote attacker to perform directory traversal attacks.

The vulnerability exists due to input validation error when processing directory traversal sequences in aiohttp.web.static(follow_symlinks=True). A remote attacker can send a specially crafted HTTP request and read arbitrary files on the system.

Request examples:

For windows: /static/../D:\flag.txt Poc

For Linux: /static/../../../../etc/passwd


Mitigation
Install update from vendor's website.

Vulnerable software versions

aiohttp: 1.0.5 - 3.9.1


External links
http://github.com/aio-libs/aiohttp/security/advisories/GHSA-5h86-8mv2-jq9f
http://github.com/aio-libs/aiohttp/pull/8079
http://github.com/aio-libs/aiohttp/commit/1c335944d6a8b1298baf179b7c0b3069f10c514b


Q & A

Can this vulnerability be exploited remotely?

Yes. This vulnerability can be exploited by a remote non-authenticated attacker via the Internet.

Is there known malware, which exploits this vulnerability?

Yes. This vulnerability is being exploited in the wild.


Latest bulletins with this vulnerability