{"id":"CVE-2024-32966","published":"2024-05-01T05:39:28Z","modified":"2024-08-02T02:27:52Z","title":"Stored Cross-site Scripting in directory listings via file names in static-web-server","vendor":"static-web-server","product":"static-web-server","tier":"tail","description":{"text":"Static Web Server (SWS) is a tiny and fast production-ready web server suitable to serve static web files or assets. In affected versions if directory listings are enabled for a directory that an untrusted user has upload privileges for, a malicious file name like `<img src=x onerror=alert(1)>.txt` will allow JavaScript code execution in the context of the web server’s domain. SWS generally does not perform escaping of HTML entities on any values inserted in the directory listing. At the very least `file_name` and `current_path` could contain malicious data however. `file_uri` could also be malicious but the relevant scenarios seem to be all caught by hyper. For any web server that allow users to upload files or create directories under a name of their choosing this becomes a stored Cross-site Scripting vulnerability. Users are advised to upgrade. There are no known workarounds for this vulnerability.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00459,"percentile":0.31736,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-80","name":"Improper Neutralization of Script-Related HTML Tags in a Web Page"}],"references":[{"url":"https://github.com/static-web-server/static-web-server/security/advisories/GHSA-rwfq-v4hq-h7fg","tags":["x_refsource_CONFIRM"]}],"priority":{"score":10.4,"factors":[{"name":"EPSS percentile","points":6.35},{"name":"CVSS severity","points":4.06}]},"vendorSlug":"static-web-server","affectedVersions":[{"vendor":"static-web-server","product":"static-web-server","versions":["< 2.30.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-05-01T13:32:21.337221Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"static-web-server","vulnerableRanges":["<2.30.0"],"patched":["2.30.0"],"from":["GHSA-rwfq-v4hq-h7fg"],"provenance":"source"}],"summary":{"text":"A stored cross-site scripting flaw exists in the directory listing feature of static-web-server (SWS), where file and directory names are inserted into the generated HTML without escaping HTML entities. An attacker who can upload files or create directories with arbitrary names, and who can get a user to view the affected directory listing, can have JavaScript execute in the context of the web server's domain, with the attack requiring user interaction and a directory listing enabled over a location where untrusted users have upload privileges.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:03:05Z"},"euvd":{"id":"EUVD-2024-1781","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2024-32966","published":"2024-05-01","fixed":"2.30.0","kev":false},{"cve":"CVE-2025-67487","published":"2025-12-09","fixed":"2.40.1","kev":false,"link":{"from":"CVE-2024-32966","to":"CVE-2025-67487","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"crates.io:static-web-server","fromFixed":"2.30.0","toFixed":"2.40.1","daysApart":587}]}},{"cve":"CVE-2026-27480","published":"2026-02-21","fixed":"2.41.0","kev":false}],"package":"crates.io:static-web-server"}}