VulnWatch by ve1ve2
medium 5.8 EPSS 0.29%

GHSA-vh5m-fc9v-m84g: SSRF filter bypass (regex not applied post-resolution)

Source:
Vaultwarden releases + advisories (GitHub dani-garcia/vaultwarden)
Published:
Fetched:
Updated:
Affects:
dani-garcia vaultwarden

https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-vh5m-fc9v-m84g ↗

repo-advisoryrustCWE-918securityrepo:dani-garcia/vaultwarden

SSRF filter bypass (regex not applied post-resolution) ### Summary The internal-IP SSRF filter can be bypassed in specific non-default configuration. When an operator disables non-global-IP block (`HTTP_REQUEST_BLOCK_NON_GLOBAL_IPS=false`) and instead relies on `HTTP_REQUEST_BLOCK_REGEX` to keep the server's outbound HTTP client (icon fetching, etc.) away from internal ranges, the regex is **never applied to resolved IP addresses**. An unauthenticated attacker can therefore reach a regex-blocked internal IP by supplying a hostname that resolves to that IP but does not textually match the regex,via unauthenticated `/icons//icon.png` endpoint. Default installs are **not** affected. This is a residual gap in the same fixes implemented for CVE-2026-47160 / GHSA-72vh-x5jq-m82g (fixed in 1.36.0). That fix closed decimal/hex/octal IP-format bypass which affected the _default_ config. This report is a distinct gap, the regex is not applied post-resolution, that affects _regex-reliance_ config and is present in 1.36.0 and earlier. It is fixed in 1.37.0. ### Details The pre-connect and post-resolution filters are asymmetric. `should_block_host()` (src/http_client.rs:135) applies **both** checks to an IP host — `should_block_ip()` and `should_block_address_regex()`. But `post_resolve()` (src/http_client.rs:273) applies **only** `should_block_ip()`: // src/http_client.rs:273 @ tag 1.36.0 fn post_resolve(name: &str, ip: IpAddr) -> Result<(), CustomHttpClientError> { if should_block_ip(ip) { Err(CustomHttpClientError::NonGlobalIp { domain: Some(name.to_string()), ip }) } else { Ok(()) } } `should_block_ip()` (src/http_client.rs:61) short-circuits to `false` for every IP when the non-global-IP block is disabled: fn should_block_ip(ip: IpAddr) -> bool { if !CONFIG.http_request_block_non_global_ips() { // default: true return false; } !is_global(ip) } So with `http_request_block_non_global_ips=false`, the regex (`http_request_block_regex`, src/config.rs:703) is the *only* protection for internal ranges — yet `resolve_domain()` (src/http_client.rs:241) only runs it against the domain string in `pre_resolve()` (src/http_client.rs:257), never against the resolved IP in `post_resolve()`. For a URL whose host is a domain name, the flow is: 1. pre_resolve() -> should_block_host(Host::Domain(name)) -> regex tested against the **domain string** only. A hostname that does not textually contain the target IP does not match an IP-pattern regex -> pass. 2. DNS resolves the name to an internal IP. 3. post_resolve(name, ip) -> should_block_ip(ip) -> false (flag disabled) -> regex is never applied to the IP -> allowed. The request then proceeds to the internal IP. In contrast, the same IP supplied as a literal is caught, because should_block_host() (used for IP-literal hosts at src/api/icons.rs:123) does apply the regex. Entry point: Affected packages: rust:vaultwarden Patched: vaultwarden 1.37.0

Linked vulnerabilities (3)

CVE-2026-47160 medium 5.8 EPSS 0.29% (p22) NVDCVE.orgGHSA
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N

Server-side request forgery (SSRF) via Icon Endpoint Decimal/Hex/Octal IP Bypass

CWE: CWE-918, CWE-1389Aliases: GHSA-72vh-x5jq-m82g
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N

Server-side request forgery (SSRF) via Icon Endpoint Decimal/Hex/Octal IP Bypass

CWE: CWE-918, CWE-1389Aliases: CVE-2026-47160
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N

SSRF filter bypass (regex not applied post-resolution)

CWE: CWE-918Aliases: CVE-2026-47160, GHSA-72vh-x5jq-m82g