CVE-2024-32966
Stored Cross-site Scripting in directory listings via file names in static-web-server
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
5.8
Stored Cross-site Scripting in directory listings via file names in static-web-server
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.
- Record
CVE-2024-32966- CVSS 3.1
- 5.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L - Weakness
- CWE-79, CWE-80
- Updated
- 2026-11-02
EUVDEUVD-2024-1781
5.8
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.
- Record
EUVD-2024-1781- CVSS 3.1
- 5.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-rwfq-v4hq-h7fg
5.8
static-web-server vulnerable to stored Cross-site Scripting in directory listings via file names
Summary
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.
Details
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.
Impact
For any web server that allow users to upload files or create directories under a name of their choosing this becomes a stored XSS vulnerability.
- Record
GHSA-rwfq-v4hq-h7fg- CVSS 3.1
- 5.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L - Weakness
- CWE-79, CWE-80
- Updated
- 2026-11-02
NVD
5.8
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.
- Record
CVE-2024-32966- CVSS 3.1
- 5.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L - Weakness
- CWE-79, CWE-80
- Updated
- 2026-11-02
OSV
5.8
Stored Cross-site Scripting in directory listings via file names in static-web-server
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.
- Record
CVE-2024-32966- CVSS 3.1
- 5.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L - Weakness
- CWE-79, CWE-80
- Updated
- 2026-11-02
OSVGHSA-rwfq-v4hq-h7fg
5.8
static-web-server vulnerable to stored Cross-site Scripting in directory listings via file names
Summary
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.
Details
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.
Impact
For any web server that allow users to upload files or create directories under a name of their choosing this becomes a stored XSS vulnerability.
- Record
GHSA-rwfq-v4hq-h7fg- CVSS 3.1
- 5.8 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L - Weakness
- CWE-79, CWE-80
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
static-web-servercrates.io |
before 2.30.0 | 2.30.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-32966 is a medium vulnerability (CVSS 5.8) in Static-web-server, published May 1, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.37%, the 31st percentile. Fixed in static-web-server 2.30.0.
References
github.com/static-web-server/static-web-server/security/advisories/GHSA-rwfq-v4hq-h7fg
nvd.nist.gov/vuln/detail/CVE-2024-32966
github.com/static-web-server/static-web-server/releases/tag/v2.30.0
github.com/advisories/GHSA-rwfq-v4hq-h7fg
github.com/CVEProject/cvelistV5/tree/main/cves/2024/32xxx/CVE-2024-32966.json
github.com/static-web-server/static-web-server