/

CVE-2026-33242

Severity:

HIGH RISK

(7.5)

Path Traversal in Salvo Proxy Routing

CVE-2026-33242

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Access Control Bypass and Unauthorized Backend Access

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal flaw in Salvo's proxy component allows crafted URL paths containing ../ sequences to bypass routing constraints and reach unintended backend endpoints.

When exploited, an unauthenticated attacker can access protected or administrative paths on upstream services that should not be reachable through the proxy.

Affected context

This vulnerability appears in applications using the salvo-proxy component of the Salvo Rust web framework for routing and forwarding HTTP requests to upstream services.

It is particularly relevant where the proxy is meant to strictly control which backend paths are reachable (for example, exposing only specific APIs while hiding administrative or internal endpoints).

The issue manifests when the proxy relies on encode_url_path for composing or sanitizing upstream request paths and assumes that incoming path segments containing traversal sequences will be safely normalized.

Exploit preconditions

  • Attack surface: Publicly exposed HTTP(S) endpoints handled by salvo-proxy.
  • Required access: No authentication required; an external client can send arbitrary HTTP requests.
  • Trigger point: Any route where user-controlled path components are forwarded by the proxy to an upstream server, and path-based access controls are enforced at the proxy layer.
  • Why exploitation is possible: The encode_url_path function fails to normalize or safely encode ../ segments, because the . character is not re-encoded. As a result, traversal sequences can pass through the proxy largely unchanged, allowing requests to target backend paths that the proxy configuration intended to restrict.

Why this happens

The underlying bug is a path traversal vulnerability that stems from improper canonicalization and encoding of URL paths before forwarding them upstream.

The encode_url_path function is expected to produce a safe, encoded path representation, but it does not normalize or collapse ../ sequences and does not encode the . character, leaving traversal patterns intact.

In deployments where the proxy is treated as the primary enforcement point for which backend paths are reachable, this mismatch between expected and actual normalization behavior leads directly to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

Abstractly, this represents an insecure pattern where user-controlled path segments are trusted and forwarded without robust normalization, allowing them to escape the intended logical routing scope.

Potential impact

  • An attacker may reach internal or administrative endpoints that should not be exposed through the proxy.
  • An attacker could access protected API routes that were assumed to be shielded by proxy-level path restrictions.
  • An attacker can potentially bypass application-level access control that is enforced only on certain entry paths.
  • An attacker may increase the blast radius of any downstream vulnerabilities by gaining reachability to more backend routes.

General mitigation guidance

Mitigations focus on robust path handling and defense-in-depth around routing and access control:

  • Normalize and canonicalize URL paths before applying routing or access-control decisions, collapsing . and .. segments and rejecting paths that resolve outside the intended logical scope.
  • Treat user-supplied path segments as untrusted, and avoid composing upstream URLs directly from them without explicit validation against an allowlist or strict patterns.
  • Use URL-encoding routines that avoid leaking raw traversal semantics (for example, by rejecting or re-encoding sequences that introduce directory navigation).
  • Enforce authorization at the upstream application as well, not solely at the proxy layer, so that unexpected routing behavior does not automatically result in authorization bypass.
  • Apply least-privilege routing rules, explicitly enumerating which upstream paths are allowed rather than relying on broad catch-all forwarding.

How teams detect issues like this

Effective detection typically combines code-centric and behavior-centric approaches:

  • Static analysis / code review: Search for uses of encode_url_path (or equivalent helpers) where user-controlled segments are appended to upstream paths without explicit normalization or validation. Flag any logic that assumes encoding alone will enforce path constraints.
  • Configuration review: Examine proxy routing rules for patterns that forward variable path segments (wildcards or captures) to upstream services while relying on path structure for access control.
  • Dynamic testing / fuzzing: Use automated web scanners or bespoke scripts to send requests containing ../, ..;, mixed encoded/decoded traversal patterns, and verify whether backend endpoints that should be hidden become reachable via the proxy.
  • Logging and monitoring: Enable detailed request logging at both proxy and upstream layers, and alert on anomalous paths containing traversal indicators or unexpected access to administrative routes.

Sources

SourceLink
github.comgithub.com/salvo-rs/salvo/commit/7bac30e6960355c58e358e402072d4a3e5c4e1bb#diff-e319bf7afcb577f7e9f4fb767005072f6335d23f306dd52e8c94f3d222610d02R20
github.comgithub.com/salvo-rs/salvo/releases/tag/v0.89.3
github.comgithub.com/salvo-rs/salvo/security/advisories/GHSA-f842-phm9-p4v4

Frequently asked

questions

Yes. If the salvo-proxy-based service is exposed to the internet, an unauthenticated remote client can attempt to exploit the issue simply by crafting malicious request paths.

No. The weakness occurs in the proxy's path handling prior to any application-specific authentication, so exploitation can be attempted without logging in, assuming the affected routes are publicly reachable.

Adopt strict path normalization and validation before forwarding requests: canonicalize paths, reject traversal attempts, and ensure that allowed upstream paths are defined via explicit allowlists rather than relying on generic encoding functions.

Treat URL paths as untrusted input, centralize canonicalization logic, enforce defense-in-depth access control at both proxy and application layers, and incorporate security-focused code review and automated tests that exercise traversal patterns against routing logic.

Find out what's already
exploitable in your codebase.