Bug 2275989 (CVE-2024-27306)

Summary: CVE-2024-27306 aiohttp: XSS on index pages for static file handling
Product: [Other] Security Response Reporter: Robb Gatica <rgatica>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: adudiak, bbuckingham, bcourt, caswilli, davidn, dfreiber, drow, ehelms, epacific, gtanzill, hkataria, jburrell, jcammara, jhardy, jmitchel, jneedle, jobarker, jsherril, jtanner, kaycoth, kshier, lzap, mabashia, mhulan, mminar, nmoumoul, omaciel, orabin, osapryki, pcreech, psegedy, rbiba, rbobbitt, rchan, sidakwo, simaishi, smcdonal, sskracic, stcannon, teagle, vkumar, yguenane, zsadeh
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: aiohttp 3.9.4 Doc Type: ---
Doc Text:
A flaw was found in aiohttp, an asynchronous HTTP client/server framework for asyncio and Python. 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 cross-site scripting (XSS) attacks.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2275992, 2275990, 2275991    
Bug Blocks: 2275987    

Description Robb Gatica 2024-04-18 20:28:45 UTC
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.

https://github.com/aio-libs/aiohttp/commit/28335525d1eac015a7e7584137678cbb6ff19397
https://github.com/aio-libs/aiohttp/pull/8319
https://github.com/aio-libs/aiohttp/security/advisories/GHSA-7gpw-8wmc-pm8g

Comment 1 Robb Gatica 2024-04-18 20:37:27 UTC
Created python-aiohttp tracking bugs for this issue:

Affects: epel-all [bug 2275990]
Affects: fedora-all [bug 2275991]