Vulnerability GHSA-2j8w-xcrc-x985

Medium Risk
MEDIUM RISK
CVSS Score: 4.8
Score Range: 4.0–6.9
Medium severity vulnerabilities (CVSS 4.0–6.9). Important issues that meaningfully reduce security confidence.
9 hours ago
November 10, 2026 at 07:11 PM UTC
Rack: Rack::Request#host_with_port (and #base_url / #url) return the raw invalid Host header — incomplete fix of CVE-2026-34835
3.0.0 - 3.0.4 and 3.0.4.1 and 3.0.4.2 and 3.0.5 - 3.0.6 and 3.0.6.1 and 3.0.7 - 3.0.9 and 3.0.9.1 and 3.0.10 - 3.2.7
3.0.0 - 3.0.4 and 3.0.4.1 and 3.0.4.2 and 3.0.5 - 3.0.6 and 3.0.6.1 and 3.0.7 - 3.0.9 and 3.0.9.1 and 3.0.10 - 3.2.7

Summary

Rack: Rack::Request#host_with_port (and #base_url / #url) return the raw invalid Host header — incomplete fix of CVE-2026-34835

Details

Summary

Rack::Request#host_with_port, and therefore #base_url and #url, return the raw authority string when it fails validation. An attacker-controlled Host, X-Forwarded-Host, or Forwarded: host= value containing characters that are not permitted in an authority is embedded verbatim in URLs generated by the application.

This completes the fix for CVE-2026-34835 (GHSA-g2pf-xv49-m2h5), which made #host and #hostname return nil for an invalid authority but left this path unchanged.

Details

Rack::Request#host_with_port splits the authority with split_authority. When the AUTHORITY pattern does not match, no components are returned and host_with_port falls back to returning the unvalidated authority string. base_url is "#{scheme}://#{host_with_port}" and url appends the full path, so both inherit the raw value.

For a request with Host: evil.com/@legit.com, host returns nil while host_with_port returns evil.com/@legit.com and base_url returns http://evil.com/@legit.com. A valid Host together with an invalid X-Forwarded-Host produces the same result, because forwarded headers take priority by default.

Impact

Applications that build absolute URLs, redirects, or origin-dependent checks from req.url, req.base_url, or req.host_with_port, and that do not enforce a host allowlist, may emit URLs containing attacker-chosen characters such as @, /, ?, #, spaces, or angle brackets. Generated links and Location headers can be redirected through userinfo tricks, string-based URL checks can be bypassed, and markup is reflected where the application does not escape the value. For example, redirect in Sinatra behind a proxy that forwards X-Forwarded-Host emits the raw invalid authority in Location.

Rails overrides these methods in Action Dispatch and is not expected to be affected. Rack 3.1 and 3.2 are affected. Rack 2.2 did not receive the CVE-2026-34835 change and returns the raw value from every host method.

Mitigation

  • Update to a patched version of Rack, in which host_with_port returns nil for an invalid authority and base_url falls back to the server's own name.
  • Enforce a host allowlist with Rack::Protection::HostAuthorization, config.hosts in Rails, or at the reverse proxy, and configure the proxy to overwrite X-Forwarded-Host and Forwarded.
  • Pin the authority with the rack.request.config :authority key where available.

Related Vulnerabilities

Other vulnerabilities affecting the same packages

High Risk
9 hours ago
Rack: Multipart parsing allows DoS via unbounded scan buffer growth
0.1.0 - 0.4.0 and 0.9.0 - 1.1.0 and 1.1.1.pre and 1.1.1 - 1.2.8 and 1.3.0.beta and 1.3.0.beta2 and 1.3.0 - 1.4.7 and 1.5.0.beta.1 and 1.5.0.beta.2 and 1.5.0 - 1.5.5 and 1.6.0.beta and 1.6.0.beta2 and 1.6.0 - 1.6.13 and 2.0.0.alpha and 2.0.0.rc1 and 2.0.1 - 2.0.9 and 2.0.9.1 and 2.0.9.2 and 2.0.9.3 and 2.0.9.4 and 2.1.0 - 2.1.4 and 2.1.4.1 and 2.1.4.2 and 2.1.4.3 and 2.1.4.4 and 2.2.0 - 2.2.3 and 2.2.3.1 and 2.2.4 - 2.2.6 and 2.2.6.1 and 2.2.6.2 and 2.2.6.3 and 2.2.6.4 and 2.2.7 - 2.2.8 and 2.2.8.1 and 2.2.9 - 3.0.4 and 3.0.4.1 and 3.0.4.2 and 3.0.5 - 3.0.6 and 3.0.6.1 and 3.0.7 - 3.0.9 and 3.0.9.1 and 3.0.10 - 3.2.7 GHSA-5v64-555j-wjxm
0.1.0 - 0.4.0 and 0.9.0 - 1.1.0 and 1.1.1.pre and 1.1.1 - 1.2.8 and 1.3.0.beta and 1.3.0.beta2 and 1.3.0 - 1.4.7 and 1.5.0.beta.1 and 1.5.0.beta.2 and 1.5.0 - 1.5.5 and 1.6.0.beta and 1.6.0.beta2 and 1.6.0 - 1.6.13 and 2.0.0.alpha and 2.0.0.rc1 and 2.0.1 - 2.0.9 and 2.0.9.1 and 2.0.9.2 and 2.0.9.3 and 2.0.9.4 and 2.1.0 - 2.1.4 and 2.1.4.1 and 2.1.4.2 and 2.1.4.3 and 2.1.4.4 and 2.2.0 - 2.2.3 and 2.2.3.1 and 2.2.4 - 2.2.6 and 2.2.6.1 and 2.2.6.2 and 2.2.6.3 and 2.2.6.4 and 2.2.7 - 2.2.8 and 2.2.8.1 and 2.2.9 - 3.0.4 and 3.0.4.1 and 3.0.4.2 and 3.0.5 - 3.0.6 and 3.0.6.1 and 3.0.7 - 3.0.9 and 3.0.9.1 and 3.0.10 - 3.2.7 GHSA-5v64-555j-wjxm
Low Risk
9 hours ago
Rack: Multipart boundary ambiguity guard in Rack::Multipart::Parser can be bypassed with a quoted boundary value, allowing WAF bypass
0.1.0 - 0.4.0 and 0.9.0 - 1.1.0 and 1.1.1.pre and 1.1.1 - 1.2.8 and 1.3.0.beta and 1.3.0.beta2 and 1.3.0 - 1.4.7 and 1.5.0.beta.1 and 1.5.0.beta.2 and 1.5.0 - 1.5.5 and 1.6.0.beta and 1.6.0.beta2 and 1.6.0 - 1.6.13 and 2.0.0.alpha and 2.0.0.rc1 and 2.0.1 - 2.0.9 and 2.0.9.1 and 2.0.9.2 and 2.0.9.3 and 2.0.9.4 and 2.1.0 - 2.1.4 and 2.1.4.1 and 2.1.4.2 and 2.1.4.3 and 2.1.4.4 and 2.2.0 - 2.2.3 and 2.2.3.1 and 2.2.4 - 2.2.6 and 2.2.6.1 and 2.2.6.2 and 2.2.6.3 and 2.2.6.4 and 2.2.7 - 2.2.8 and 2.2.8.1 and 2.2.9 - 3.0.4 and 3.0.4.1 and 3.0.4.2 and 3.0.5 - 3.0.6 and 3.0.6.1 and 3.0.7 - 3.0.9 and 3.0.9.1 and 3.0.10 - 3.2.7 GHSA-p8x9-v4hv-2w4g
0.1.0 - 0.4.0 and 0.9.0 - 1.1.0 and 1.1.1.pre and 1.1.1 - 1.2.8 and 1.3.0.beta and 1.3.0.beta2 and 1.3.0 - 1.4.7 and 1.5.0.beta.1 and 1.5.0.beta.2 and 1.5.0 - 1.5.5 and 1.6.0.beta and 1.6.0.beta2 and 1.6.0 - 1.6.13 and 2.0.0.alpha and 2.0.0.rc1 and 2.0.1 - 2.0.9 and 2.0.9.1 and 2.0.9.2 and 2.0.9.3 and 2.0.9.4 and 2.1.0 - 2.1.4 and 2.1.4.1 and 2.1.4.2 and 2.1.4.3 and 2.1.4.4 and 2.2.0 - 2.2.3 and 2.2.3.1 and 2.2.4 - 2.2.6 and 2.2.6.1 and 2.2.6.2 and 2.2.6.3 and 2.2.6.4 and 2.2.7 - 2.2.8 and 2.2.8.1 and 2.2.9 - 3.0.4 and 3.0.4.1 and 3.0.4.2 and 3.0.5 - 3.0.6 and 3.0.6.1 and 3.0.7 - 3.0.9 and 3.0.9.1 and 3.0.10 - 3.2.7 GHSA-p8x9-v4hv-2w4g
Medium Risk
10 hours ago
Rack: Rack::Static header_rules bypass via dot-segment normalization mismatch
0.1.0 - 0.4.0 and 0.9.0 - 1.1.0 and 1.1.1.pre and 1.1.1 - 1.2.8 and 1.3.0.beta and 1.3.0.beta2 and 1.3.0 - 1.4.7 and 1.5.0.beta.1 and 1.5.0.beta.2 and 1.5.0 - 1.5.5 and 1.6.0.beta and 1.6.0.beta2 and 1.6.0 - 1.6.13 and 2.0.0.alpha and 2.0.0.rc1 and 2.0.1 - 2.0.9 and 2.0.9.1 and 2.0.9.2 and 2.0.9.3 and 2.0.9.4 and 2.1.0 - 2.1.4 and 2.1.4.1 and 2.1.4.2 and 2.1.4.3 and 2.1.4.4 and 2.2.0 - 2.2.3 and 2.2.3.1 and 2.2.4 - 2.2.6 and 2.2.6.1 and 2.2.6.2 and 2.2.6.3 and 2.2.6.4 and 2.2.7 - 2.2.8 and 2.2.8.1 and 2.2.9 - 3.0.4 and 3.0.4.1 and 3.0.4.2 and 3.0.5 - 3.0.6 and 3.0.6.1 and 3.0.7 - 3.0.9 and 3.0.9.1 and 3.0.10 - 3.2.7 GHSA-wvg4-6p58-3gh3
0.1.0 - 0.4.0 and 0.9.0 - 1.1.0 and 1.1.1.pre and 1.1.1 - 1.2.8 and 1.3.0.beta and 1.3.0.beta2 and 1.3.0 - 1.4.7 and 1.5.0.beta.1 and 1.5.0.beta.2 and 1.5.0 - 1.5.5 and 1.6.0.beta and 1.6.0.beta2 and 1.6.0 - 1.6.13 and 2.0.0.alpha and 2.0.0.rc1 and 2.0.1 - 2.0.9 and 2.0.9.1 and 2.0.9.2 and 2.0.9.3 and 2.0.9.4 and 2.1.0 - 2.1.4 and 2.1.4.1 and 2.1.4.2 and 2.1.4.3 and 2.1.4.4 and 2.2.0 - 2.2.3 and 2.2.3.1 and 2.2.4 - 2.2.6 and 2.2.6.1 and 2.2.6.2 and 2.2.6.3 and 2.2.6.4 and 2.2.7 - 2.2.8 and 2.2.8.1 and 2.2.9 - 3.0.4 and 3.0.4.1 and 3.0.4.2 and 3.0.5 - 3.0.6 and 3.0.6.1 and 3.0.7 - 3.0.9 and 3.0.9.1 and 3.0.10 - 3.2.7 GHSA-wvg4-6p58-3gh3
Medium Risk
7 months ago
Rack::Request accepts invalid Host characters, enabling host allowlist bypass
3.0.0.beta1 and 3.0.0.rc1 and 3.0.0 - 3.0.4 and 3.0.4.1 and 3.0.4.2 and 3.0.5 - 3.0.6 and 3.0.6.1 and 3.0.7 - 3.0.9 and 3.0.9.1 and 3.0.10 - 3.2.5 GHSA-g2pf-xv49-m2h5
3.0.0.beta1 and 3.0.0.rc1 and 3.0.0 - 3.0.4 and 3.0.4.1 and 3.0.4.2 and 3.0.5 - 3.0.6 and 3.0.6.1 and 3.0.7 - 3.0.9 and 3.0.9.1 and 3.0.10 - 3.2.5 GHSA-g2pf-xv49-m2h5
Medium Risk
7 months ago
Rack has Content-Length mismatch in Rack::Files error responses
0.1.0 - 0.4.0 and 0.9.0 - 1.1.0 and 1.1.1.pre and 1.1.1 - 1.2.8 and 1.3.0.beta and 1.3.0.beta2 and 1.3.0 - 1.4.7 and 1.5.0.beta.1 and 1.5.0.beta.2 and 1.5.0 - 1.5.5 and 1.6.0.beta and 1.6.0.beta2 and 1.6.0 - 1.6.13 and 2.0.0.alpha and 2.0.0.rc1 and 2.0.1 - 2.0.9 and 2.0.9.1 and 2.0.9.2 and 2.0.9.3 and 2.0.9.4 and 2.1.0 - 2.1.4 and 2.1.4.1 and 2.1.4.2 and 2.1.4.3 and 2.1.4.4 and 2.2.0 - 2.2.3 and 2.2.3.1 and 2.2.4 - 2.2.6 and 2.2.6.1 and 2.2.6.2 and 2.2.6.3 and 2.2.6.4 and 2.2.7 - 2.2.8 and 2.2.8.1 and 2.2.9 - 2.2.22 and 3.0.0.beta1 and 3.0.0.rc1 and 3.0.0 - 3.0.4 and 3.0.4.1 and 3.0.4.2 and 3.0.5 - 3.0.6 and 3.0.6.1 and 3.0.7 - 3.0.9 and 3.0.9.1 and 3.0.10 - 3.2.5 GHSA-q2ww-5357-x388
0.1.0 - 0.4.0 and 0.9.0 - 1.1.0 and 1.1.1.pre and 1.1.1 - 1.2.8 and 1.3.0.beta and 1.3.0.beta2 and 1.3.0 - 1.4.7 and 1.5.0.beta.1 and 1.5.0.beta.2 and 1.5.0 - 1.5.5 and 1.6.0.beta and 1.6.0.beta2 and 1.6.0 - 1.6.13 and 2.0.0.alpha and 2.0.0.rc1 and 2.0.1 - 2.0.9 and 2.0.9.1 and 2.0.9.2 and 2.0.9.3 and 2.0.9.4 and 2.1.0 - 2.1.4 and 2.1.4.1 and 2.1.4.2 and 2.1.4.3 and 2.1.4.4 and 2.2.0 - 2.2.3 and 2.2.3.1 and 2.2.4 - 2.2.6 and 2.2.6.1 and 2.2.6.2 and 2.2.6.3 and 2.2.6.4 and 2.2.7 - 2.2.8 and 2.2.8.1 and 2.2.9 - 2.2.22 and 3.0.0.beta1 and 3.0.0.rc1 and 3.0.0 - 3.0.4 and 3.0.4.1 and 3.0.4.2 and 3.0.5 - 3.0.6 and 3.0.6.1 and 3.0.7 - 3.0.9 and 3.0.9.1 and 3.0.10 - 3.2.5 GHSA-q2ww-5357-x388
View all vulnerabilities for these packages

Impacted packages

Timeline

Published
9 hours ago
November 10, 2026 at 07:11 PM UTC
Fixed (3.2.8)
12 days ago
October 30, 2026 at 02:15 AM UTC
Last Modified
9 hours ago
November 10, 2026 at 07:30 PM UTC