CVE-2024-32966: static-web-server vulnerable to stored Cross-site Scripting in directory listings via file names
5.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.22266%
CWE
Published
5/1/2024
Updated
5/1/2024
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:L
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| static-web-server | rust | < 2.30.0 | 2.30.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from unescaped HTML output in directory listings. The release notes show directory listing handling was refactored in PR #367 using maud templates, which auto-escape by default. This implies previous implementations (vulnerable versions) used unsafe string concatenation. The core functions responsible for rendering directory listings and formatting individual entries would have directly inserted user-controlled file names into HTML without sanitization. The 'current_path' and 'file_name' parameters mentioned in the advisory map directly to values processed by these listing rendering functions.