CVE-2026-33242: Salvo :encode_url_path Allows API Gateway Bypass Vulnerability
HIGHCVE-2026-33242 is a HIGH (CVSS 7.5) :encode_url_path allows api gateway bypass vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Salvo libraries in the crates.io ecosystem. The issue involves :encode_url_path allows api gateway bypass. Remediation is available by upgrading affected packages to version 0.89.3.
CVE-2026-33242 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-33242
To remediate this vulnerability, upgrade all affected Salvo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade salvo to 0.89.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for salvo
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-33242, inspect your project dependencies for Salvo:
inspect dependencies for salvo
Analyze the terminal output to locate any version of Salvo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.89.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Salvo, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-33242 Affected Salvo Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
salvo
|
crates.io |
≥ 0.39.0
< 0.89.3
|
0.89.3
|
References
Frequently Asked Questions
What is CVE-2026-33242?
Which Salvo versions are affected?
What version fixes CVE-2026-33242?
Is salvo affected?
What is the CVSS score of CVE-2026-33242?
What CWE is associated with CVE-2026-33242?
How can I check crates.io dependencies for CVE-2026-33242?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f842-phm9-p4v4",
"modified" : "2026-03-25T20:48:34Z",
"published" : "2026-03-19T12:44:28Z",
"aliases" : [ "CVE-2026-33242" ],
"summary" : "Salvo has a Path Traversal in salvo-proxy::encode_url_path allows API Gateway Bypass",
"details" : "### Details\n\nA Path Traversal and Access Control Bypass vulnerability was discovered in the salvo-proxy component of the Salvo Rust framework (v0.89.2). The vulnerability allows an unauthenticated external attacker to bypass proxy routing constraints and access unintended backend paths (e.g., protected endpoints or administrative dashboards). This issue stems from the encode_url_path function, which fails to normalize \"../\" sequences and inadvertently forwards them verbatim to the upstream server by not re-encoding the \".\" character.\n\n---\n\n### Technical Details\n\nIf someone tries to attack by sending a special code like `%2e%2e`, Salvo changes it back to `../` when it first checks the path. The proxy then gets this plain `../` value. When making the new URL to send forward, the `encode_url_path` function tries to change the path again, but its normal settings do not include the `.` (dot) character. Because of this, the proxy puts `../` straight into the new URL and sends a request like `GET /api/../admin HTTP/1.1` to the backend server.\n\n```rust\n// crates/proxy/src/lib.rs (Lines 100-105)\n\npub(crate) fn encode_url_path(path: &str) -> String {\n path.split('/')\n .map(|s| utf8_percent_encode(s, PATH_ENCODE_SET).to_string())\n .collect::<Vec<_>>()\n .join(\"/\")\n}\n```\n\n---\n\n### PoC\n\n1 - Setup an Nginx Backend Server for example\n2 - Start Salvo Proxy Gateway in other port routing to /api/\n3 - Run the curl to test the bypass:\n\n```bash\ncurl -s http://127.0.0.1:8080/gateway/api/%2e%2e%2fadmin/index.html\n```\n\n---\n\n### Impact\n\nIf attackers take advantage of this problem, they can get past API Gateway security checks and route limits without logging in. This could accidentally make internal services, admin pages, or folders visible.\n\nThe attack works because the special path is sent as-is to the backend, which often happens in systems that follow standard web address rules. Attackers might also use different ways of writing URLs or add extra parts to the web address to get past simple security checks that only look for exact `../` patterns.\n\n---\n\n### Remediation\n\nInstead of changing the text of the path manually, the proxy should use a standard way to clean up the path according to RFC 3986 before adding it to the main URL. It is better to use a trusted tool like the URL crate to join paths, or to block any path parts with “..” after decoding them. But a custom implementation maybe looks like:\n\n```rust\npub(crate) fn encode_url_path(path: &str) -> String {\n let normalized = normalize_path(path);\n normalized.split('/')\n .map(|s| utf8_percent_encode(s, PATH_ENCODE_SET).to_string())\n .collect::<Vec<_>>()\n .join(\"/\")\n}\n\nfn normalize_path(path: &str) -> String {\n let mut stack = Vec::new();\n for part in path.split('/') {\n match part {\n \"\" | \".\" => (), \n \"..\" => { let _ = stack.pop(); },\n _ => stack.push(part),\n }\n }\n stack.join(\"/\")\n}\n```\n---\n\n**Vulnerable code introduced in:**\nhttps://github.com/salvo-rs/salvo/commit/7bac30e6960355c58e358e402072d4a3e5c4e1bb#diff-e319bf7afcb577f7e9f4fb767005072f6335d23f306dd52e8c94f3d222610d02R20\n\n---\n\n**Author**: Tomas Illuminati",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "salvo"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.39.0"
}, {
"fixed" : "0.89.3"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.89.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/salvo-rs/salvo/security/advisories/GHSA-f842-phm9-p4v4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33242"
}, {
"type" : "WEB",
"url" : "https://github.com/salvo-rs/salvo/commit/7bac30e6960355c58e358e402072d4a3e5c4e1bb#diff-e319bf7afcb577f7e9f4fb767005072f6335d23f306dd52e8c94f3d222610d02R20"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/salvo-rs/salvo"
}, {
"type" : "WEB",
"url" : "https://github.com/salvo-rs/salvo/releases/tag/v0.89.3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-19T12:44:28Z",
"nvd_published_at" : "2026-03-24T00:16:29Z"
}
}