GHSA-rjf8-2wcw-f6mp — salvo
HIGHGHSA-rjf8-2wcw-f6mp is a high-severity (CVSS 8.8) Cross-site Scripting (XSS) vulnerability in salvo. A fix is available for salvo — see the affected versions and patch details below.
Salvo is vulnerable to reflected XSS in the list_html function
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
Exploitation and automatability from CISA’s SSVC triage for GHSA-rjf8-2wcw-f6mp.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-rjf8-2wcw-f6mp plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,166 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
salvoReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.
Description
Summary
The function list_html generates an file view of a folder which includes a render of the current path, in which its inserted in the HTML without proper sanitation, leading to reflected XSS. The request path is decoded and normalized in the matching stage but is not inserted raw in the HTML view (current.path). The only constraint here is for the root path (e.g., /files in the PoC example) to have a subdirectory (e. g., common ones like styles/scripts/etc.) so that the matching returns the list HTML page instead of the Not Found page.
Details
The vulnerable snippet of code is the following: dir.rs
// ... fn list_html(...
let mut ftxt = format!(
r#"<!DOCTYPE html><html><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>{}</title>
<style>{}</style></head><body><header><h3>Index of: {}</h3></header><hr/>"#,
current.path,
HTML_STYLE,
header_links(¤t.path)
);
// ...
As seen here <title>{}</title> it is inserted unsafely.
PoC
https://github.com/user-attachments/assets/92a29a67-547b-40a5-af26-f1b0dd332702
Here is the example app, note this doesn’t need an upload feature (e.g to the other reported vulnerability), only the sub-folder is required.
main.rs
use salvo::prelude::*;
use salvo::serve_static::StaticDir;
use tokio::fs;
#[tokio::main]
async fn main() {
tracing_subscriber::fmt().init();
fs::create_dir_all("uploads").await.expect("create uploads dir");
let router = Router::new()
.push(
Router::with_path("files/{**rest_path}")
.get(StaticDir::new("uploads").auto_list(true)),
);
let acceptor = TcpListener::new("127.0.0.1:5800").bind().await;
Server::new(acceptor).serve(router).await;
}
Cargo.toml
[package]
name = "salvo-staticdir-xss-poc"
version = "0.1.0"
edition = "2024"
[dependencies]
salvo = { version = "0.85.0", features = ["serve-static"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread", "fs"] }
tracing-subscriber = "0.3"
Setup commands:
mkdir uploads
mkdir uploads/bla
Impact
JavaScript execution, most likely leading to an account takeover, depending on the site's constraint (CSP, etc…).
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | salvo | all versions | 0.88.1cargo update -p salvo --precise 0.88.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for salvo, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update salvo to 0.88.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-rjf8-2wcw-f6mp is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-rjf8-2wcw-f6mp can be triaged on real exposure rather than presence alone.
Tailored to GHSA-rjf8-2wcw-f6mp. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-rjf8-2wcw-f6mp in your dependencies?
O3 Security finds GHSA-rjf8-2wcw-f6mp across crates.io dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.