The vulnerability analysis is based on the provided commit 7bac30e6960355c58e358e402072d4a3e5c4e1bb, which, while intending to fix a separate issue, introduced a path traversal vulnerability. The core of the vulnerability lies in the newly added salvo_proxy::encode_url_path function. This function is responsible for encoding the path portion of a URL before forwarding a request to an upstream server. However, the implementation fails to normalize the path and does not properly handle path traversal sequences like '..'.
The salvo_proxy::Proxy::handle function was modified in the same commit to use this new, vulnerable function. It extracts a wildcard path parameter from the request and passes it directly to encode_url_path. When an attacker sends a request with a URL-encoded path traversal sequence (e.g., /api/%2e%2e/admin), the Salvo framework decodes it to /api/../admin. This string is then passed to encode_url_path, which does not sanitize the '..' segment, forwarding it to the backend. This allows the attacker to bypass API gateway routing restrictions and access unintended backend paths. Both Proxy::handle (as the entry point for tainted input) and encode_url_path (as the flawed processing function) would appear in a runtime profile during exploitation.