Rack: host_with_port, base_url and url return raw invalid Host header
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
Rack's Rack::Request#host_with_port, #base_url and #url can return an invalid authority taken verbatim from the Host, X-Forwarded-Host or Forwarded host= header. From 3.0 before 3.1.23 and from 3.2 before 3.2.8, applications that lack an independent host allowlist and use these methods for absolute URLs, redirects or origin-dependent checks can be made to emit attacker-chosen delimiters, enabling redirect manipulation, string-based allowlist bypass and unescaped markup reflection. Rails overrides these methods and is not expected to be affected. The weakness is CWE-1286, with a CVSS 3.1 base score of 4.8 (MEDIUM).
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
Description from the CNA
Rack is a modular Ruby web server interface. From 3.0 until 3.1.23 and 3.2.8, Rack::Request#host_with_port, #base_url, and #url can return an attacker-controlled invalid authority from Host, X-Forwarded-Host, or Forwarded: host= verbatim. Applications without an independent host allowlist that use these methods for absolute URLs, redirects, or origin-dependent checks can emit attacker-chosen delimiters, enabling redirect manipulation, string-based allowlist bypass, or unescaped markup reflection. Rails overrides these methods and is not expected to be affected. This issue is fixed in versions 3.1.23 and 3.2.8.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| rack | rack | 3.0 to before 3.1.23; 3.2 to before 3.2.8 | 3.1.23, 3.2.8 | Patch available | CNA |
| — | rack (RubyGems) | 3.0.0 to before 3.1.23 | 3.1.23 | Patch available | GHSA-2j8w-xcrc-x985 |
| — | rack (RubyGems) | 3.2.0 to before 3.2.8 | 3.2.8 | Patch available | GHSA-2j8w-xcrc-x985 |
- rack Vendorrack Affected 3.0 to before 3.1.23; 3.2 to before 3.2.8 Fixed in 3.1.23, 3.2.8 Patch available CNA
- rack (RubyGems) Vendor— Affected 3.0.0 to before 3.1.23 Fixed in 3.1.23 Patch available GHSA-2j8w-xcrc-x985
- rack (RubyGems) Vendor— Affected 3.2.0 to before 3.2.8 Fixed in 3.2.8 Patch available GHSA-2j8w-xcrc-x985
Remediation
Upgrade rack to 3.1.23 or 3.2.8. Red Hat rates this issue Moderate. Applications that cannot upgrade should validate the Host header against their own allowlist before using these methods.
Written with Claude Haiku 5.5 from the sources below · 2026-11-12
- Fix · CNA rack (rack) Fixed in 3.1.23, 3.2.8
- Fix · GHSA-2j8w-xcrc-x985 rack (RubyGems) Fixed in 3.1.23 Advisory →
- Fix · GHSA-2j8w-xcrc-x985 rack (RubyGems) Fixed in 3.2.8 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat 3scale API Management Platform 2 | Affected | No fix yet: Fix deferred |
Not affected: 8 products
- Red Hat 3scale API Management Platform 2
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Red Hat OpenStack Platform 13 (Queens)
- Red Hat OpenStack Platform 16.2
- Red Hat OpenStack Platform 17.1
Timeline
- 2026-11-09 Threatist record created from CVE-2026-125109
- 2026-11-10 CISA SSVC decision points changed
- 2026-11-10 Alias added: GHSA-2j8w-xcrc-x985
- 2026-11-10 Fix available: RubyGems/[email protected], RubyGems/[email protected] · GHSA-2j8w-xcrc-x985
- 2026-11-10 CVSS score added · GHSA-2j8w-xcrc-x985
- 2026-11-10 Weakness changed · GHSA-2j8w-xcrc-x985
- 2026-11-10 8 new references · GHSA-2j8w-xcrc-x985
- 2026-11-11 Affected versions changed · Red Hat
- 2026-11-11 CVSS score added · Red Hat
References
Other 7
- https://github.com/rack/rack/security/advisories/GHSA-2j8w-xcrc-x985
- https://github.com/rack/rack/commit/4380381a56dc52556a436d6d794c8e18dc8b0565
- https://github.com/rack/rack/commit/49386f460286b7346c7003b69a839de782cc8a39
- https://github.com/rack/rack/releases/tag/v3.1.23
- https://github.com/rack/rack/releases/tag/v3.2.8
- https://github.com/rack/rack
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/GHSA-2j8w-xcrc-x985.yml
More rack vulnerabilities
- TI-2024-23301 rack-contrib vulnerable to Denial of Service due to the unconstrained value of the incoming "profiler_runs" parameter CVSS 3.1HIGH 8.6
- TI-2024-16580 Rack ReDos in content type parsing (2nd degree polynomial) CVSS 3.1HIGH 7.5
- TI-2026-28312 Rack::Session::Cookie secrets: decrypt failure fallback enables secretless session forgery and Marshal deserialization CVSS 4.0CRITICAL 9.3
- TI-2024-17236 Possible Denial of Service Vulnerability in Rack Header Parsing CVSS 3.1HIGH 7.5
- TI-2024-17231 Possible DoS Vulnerability with Range Header in Rack CVSS 3.1HIGH 7.5
- TI-2023-12254 Uncontrolled resource consumption in https://github.com/rack/rack CVSS 3.1HIGH 7.5
Sources
- CVE-2026-125109 · CVE Program
- CVE-2026-125109 · NVD
- FIRST EPSS
- GHSA-2j8w-xcrc-x985 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-125109 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences