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

Published Nov 9, 2026
·
Updated

Rack is a modular Ruby web server interface. From 3.0 until 3.1.23 and 3.2.8, Rack::Request#hostwithport, #baseurl, 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.

Affected Software

1 affected component
rubygems/rack>=3.0<3.1.23, >=3.2.0<3.2.8

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Rack to a version that resolves this vulnerability.

    Fixed in 3.1.23
  2. Upgrade

    Upgrade Rack to a version that resolves this vulnerability.

    Fixed in 3.2.8

Event History

Nov 9, 2026
CVE Published
via MITRE·09:57 PM
Data Sourced
via MITRE·09:57 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are most exposed?

Applications using Rack directly are affected if they use Rack::Request#host_with_port, #base_url, or #url to construct absolute URLs, redirects, or perform origin-dependent checks without an independent host allowlist. Rails overrides these methods and is not expected to be affected.

2

What attacker-controlled inputs can trigger the issue?

An attacker can supply an invalid authority through the Host header, X-Forwarded-Host header, or the host= parameter in the Forwarded header. Exploitation does not require authentication or user interaction, but has high attack complexity.

3

What should be done if an immediate upgrade is not possible?

Apply an independent allowlist for accepted hosts before using these Rack request methods in absolute URLs, redirects, or origin checks. Avoid reflecting values returned by these methods into markup unless they are appropriately handled.

4

How can I determine whether my Rack version is fixed?

The issue is fixed in Rack 3.1.23 and 3.2.8. Versions from 3.0 up to those fixed releases are affected.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203