{"id":"CVE-2024-27306","aliases":["CVE-2024-27306","GHSA-7gpw-8wmc-pm8g","PYSEC-2026-1102"],"related":[],"kind":"vulnerability","state":"published","title":"aiohttp vulnerable to XSS on index pages for static file handling","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nA XSS vulnerability exists on index pages for static file handling.\n\n### Details\n\nWhen using `web.static(..., show_index=True)`, the resulting index pages do not escape file names.\n\nIf users can upload files with arbitrary filenames to the static directory, the server is vulnerable to XSS attacks.\n\n### Workaround\n\nWe have always recommended using a reverse proxy server (e.g. nginx) for serving static files. Users following the recommendation are unaffected.\n\nOther users can disable `show_index` if unable to upgrade.\n\n-----\n\nPatch: https://github.com/aio-libs/aiohttp/pull/8319/files","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-04-18T13:45:21.000Z","modified":"2026-09-10T03:50:11.218Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"}],"cwes":["CWE-79","CWE-80"],"affected":[{"ranges":[{"version":"< 3.9.4","status":"affected"}],"vendor":"aio-libs","product":"aiohttp","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","fixed":"3.9.4","status":"affected"}],"vendor":"aiohttp","product":"aiohttp","cpe":"cpe:2.3:a:aiohttp:aiohttp:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.9.4"}],"ecosystem":"PyPI","package":"aiohttp","purl":"pkg:pypi/aiohttp","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.9.4"}],"vendor":"aiohttp","product":"aiohttp","cpe":"cpe:2.3:a:aiohttp:aiohttp:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"38"},{"status":"affected","version":"39"},{"status":"affected","version":"40"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:38:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"3.9.4"}],"ecosystem":"PyPI","package":"aiohttp","purl":"pkg:pypi/aiohttp","source":"pysec"}],"references":[{"url":"https://github.com/aio-libs/aiohttp/security/advisories/GHSA-7gpw-8wmc-pm8g","tags":["vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/aio-libs/aiohttp/pull/8319","tags":["issue-tracking","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/aio-libs/aiohttp/commit/28335525d1eac015a7e7584137678cbb6ff19397","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2EXRGTN2WG7VZLUZ7WOXU5GQJKCPPHKP/","tags":["mailing-list","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NWEI6NIHZ3G7DURDZVMRK7ZEFC2BTD3U/","tags":["mailing-list","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZIVBMPEY7WWOFMC3CWXFBRQPFECV4SW3/","tags":["mailing-list","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/02/msg00002.html","tags":["web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27306","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/aio-libs/aiohttp/pull/8319/files","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/aio-libs/aiohttp","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2EXRGTN2WG7VZLUZ7WOXU5GQJKCPPHKP","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NWEI6NIHZ3G7DURDZVMRK7ZEFC2BTD3U","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZIVBMPEY7WWOFMC3CWXFBRQPFECV4SW3","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/aiohttp","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-7gpw-8wmc-pm8g","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-04-25T19:36:48.583Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-27306","url":"https://www.cve.org/CVERecord?id=CVE-2024-27306","licence":"CVE Terms of Use","modified":"2025-11-03T20:37:02.696Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7gpw-8wmc-pm8g","url":"https://github.com/advisories/GHSA-7gpw-8wmc-pm8g","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:11.218Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-27306","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27306","licence":"Public domain","modified":"2026-06-17T07:19:36.930Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1102","url":"https://osv.dev/vulnerability/PYSEC-2026-1102","licence":"CC-BY-4.0","modified":"2026-07-07T17:46:25.711Z"}],"updatedAt":"2026-11-25T22:58:39.452Z","epss":{"score":0.00666,"percentile":0.53103,"date":"2026-12-01T12:00:22.000Z"}}