Rack: Rack::Request#host_with_port (and #base_url / #url) return the raw invalid Host header — incomplete fix of
Affects rackSource GCVE Database
Mentioned vulnerabilities
Not known to be exploited · CVSS 4.8 Medium : upgrade to 3.1.23 when convenient.
Data as of 10 Nov 2026, 22:18 UTC
Thin evidence
One scorer or none| CNA (GitHub_M) | CVSS 3.1 | 4.8 |
|---|
- Patch
- Available – fixed in 3.1.23, 3.2.8
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 9 Nov 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 10 Nov 2026.
What to do
Upgrade rack to 3.1.23; rack to 3.2.8.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| RubyGemsrack | Affected
| Fixed in
|
| RubyGemsrack | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Update Rack to version 3.1.23 or 3.2.8 or later, where host_with_port returns nil for invalid authority and base_url falls back to the server's own name. Enforce a host allowlist using Rack::Protection::HostAuthorization, Rails config.hosts, or at the reverse proxy. Configure proxies to overwrite X-Forwarded-Host and Forwarded headers. Optionally, pin the authority using rack.request.config :authority key where supported.
Description
A vulnerability in Rack's Request handling causes methods like host_with_port, base_url, and url to return raw, unvalidated Host header values when the authority string is invalid. This can lead to attacker-controlled characters being embedded in URLs generated by the application, potentially enabling URL manipulation and bypass of string-based URL checks. The issue affects Rack versions 3.0.0 up to but not including 3.1.23 and 3.2.0 up to but not including 3.2.8. A fix is available in versions 3.1.23 and 3.2.8.
References
- github.com/rack/rack/security/advisories/GHSA-2j8w-xcrc-x985 (opens in a new tab)
- nvd.nist.gov/vuln/detail/CVE-2026-125109 (opens in a new tab)
- github.com/rack/rack/commit/4380381a56dc52556a436d6d794c8e18dc8b0565 (opens in a new tab)
- github.com/rack/rack/commit/49386f460286b7346c7003b69a839de782cc8a39 (opens in a new tab)
- github.com/rack/rack (opens in a new tab)
- github.com/rack/rack/releases/tag/v3.1.23 (opens in a new tab)
- github.com/rack/rack/releases/tag/v3.2.8 (opens in a new tab)
- github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/GHSA-2j8w-xcrc-x985.yml (opens in a new tab)