Vulnerability · Published Apr 18, 2024 · Assigned by GitHub_M
CVE-2024-27306aiohttp vulnerable to XSS on index pages for static file handling
Medium 6.1
In plain English
A medium-severity cross-site scripting in aiohttp from aio-libs. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 52% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
aiohttp is an asynchronous HTTP client/server framework for asyncio and Python. A XSS vulnerability exists on index pages for static file handling. This vulnerability is fixed in 3.9.4. We have always recommended using a reverse proxy server (e.g. nginx) for serving static files. Users following the recommendation are unaffected. Other users can disable `show_index` if unable to upgrade.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | python-aiohttp | no fix listed | DEBIAN-CVE-2024-27306 |
| Debian:13 | python-aiohttp | 3.9.5-1 | DEBIAN-CVE-2024-27306 |
| Debian:14 | python-aiohttp | 3.9.5-1 | DEBIAN-CVE-2024-27306 |
| PyPI | aiohttp | 3.9.4 | GHSA-7gpw-8wmc-pm8g |
| PyPI | aiohttp | 3.9.4 | PYSEC-2026-1102 |
Affected products (as reported)
Weakness: CWE-79, CWE-80 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
References
- https://github.com/aio-libs/aiohttp/security/advisories/GHSA-7gpw-8wmc-pm8g x_refsource_CONFIRM
- https://github.com/aio-libs/aiohttp/pull/8319 x_refsource_MISC
- https://github.com/aio-libs/aiohttp/commit/28335525d1eac015a7e7584137678cbb6ff19397 x_refsource_MISC
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2EXRGTN2WG7VZLUZ7WOXU5GQJKCPPHKP/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NWEI6NIHZ3G7DURDZVMRK7ZEFC2BTD3U/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZIVBMPEY7WWOFMC3CWXFBRQPFECV4SW3/
- https://lists.debian.org/debian-lts-announce/2025/02/msg00002.html