6.1medium
aiohttp vulnerable to XSS on index pages for static file handling
- Severity
- 6.1medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.89% (higher than 57% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-7gpw-8wmc-pm8gPYSEC-2026-1102
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
| Product or package | Versions | Reported by |
|---|---|---|
| aio-libs aiohttp | < 3.9.4 | CVE List |
| aiohttp aiohttp | before 3.9.4 | CVE List, NVD |
| aiohttp (PyPI) | before 3.9.4 | GitHub Advisory Database, PyPA Advisory Database |
| fedoraproject fedora | 38, 39, 40 | NVD |
All scores
| GitHub_M | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| PyPA Advisory Database | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
Summary
A XSS vulnerability exists on index pages for static file handling.
Details
When using web.static(..., show_index=True), the resulting index pages do not escape file names.
If users can upload files with arbitrary filenames to the static directory, the server is vulnerable to XSS attacks.
Workaround
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.
NVD (es)
aiohttp es un framework cliente/servidor HTTP asíncrono para asyncio y Python. Existe una vulnerabilidad XSS en las páginas de índice para el manejo de archivos estáticos. Esta vulnerabilidad se solucionó en 3.9.4. Siempre hemos recomendado utilizar un servidor proxy inverso (por ejemplo, nginx) para servir archivos estáticos. Los usuarios que sigan la recomendación no se verán afectados. Otros usuarios pueden desactivar `show_index` si no pueden actualizar.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-27306 changed 2025-11-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-7gpw-8wmc-pm8g changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-27306 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2026-1102 changed 2026-07-07 | CC-BY-4.0 |