Every CVESearch/Get API key

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

4.8 MediumFix available

CVE-2026-125109 is a medium vulnerability (CVSS 4.8) in Rack, published November 9, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.22%, the 12th percentile. Fixed in rack 3.1.23.

What does this mean?
Severity
4.8 MediumCVSS 3.1, CVE List
Exploit chance
0.22%EPSS, 12th percentile
Exploitation
None knownNot on CISA’s or ENISA’s lists
Fixed in
3.1.23rack +15 more

Description

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
None

Exploit likelihood

0.22%Unchanged since Nov 10, 2026
90%50%10%1%

Affected products

Affected packages

Affected packages
PackageAffectedFixed
rack
RubyGems
3.0.0 up to 3.1.23
3.1.23
rack
RubyGems
3.2.0 up to 3.2.8
3.2.8
ruby-rack
Debian:12
All versions, plus listed versions
2.2.13-1~deb12u12.2.20-0+deb12u12.2.22-0+deb12u12.2.22-0+deb12u22.2.6.4-1
Show 23 moreShow less
2.2.6.4-1+deb12u12.2.7-12.2.7-1.13.0.0-13.0.8-13.0.8-23.0.8-33.0.8-43.1.12-13.1.12-2~exp13.1.16-0.13.1.18-13.1.18-1~deb13u13.1.9-1~exp13.1.9-23.2.4-13.2.5-13.2.5-23.2.6-13.2.6-23.2.6-33.2.7-13.2.8-1
None known
ruby-rack
Debian:13
All versions, plus listed versions
3.1.16-0.13.1.18-13.1.18-1~deb13u13.1.20-0+deb13u13.1.20-0+deb13u2
Show 8 moreShow less
3.2.4-13.2.5-13.2.5-23.2.6-13.2.6-23.2.6-33.2.7-13.2.8-1
None known
ruby-rack
Debian:14
before 3.2.8-1, plus listed versions
3.1.16-0.13.1.18-13.1.18-1~deb13u13.2.4-13.2.5-1
Show 5 moreShow less
3.2.5-23.2.6-13.2.6-23.2.6-33.2.7-1
3.2.8-1
gitlab-exporter
Docker Hardened Images:Debian:13
Listed versions
16.10.0-116.10.0-1016.10.0-1116.10.0-1216.10.0-13
Show 45 moreShow less
16.10.0-1416.10.0-1516.10.0-1616.10.0-1716.10.0-1816.10.0-1916.10.0-216.10.0-2016.10.0-2116.10.0-2216.10.0-2316.10.0-2416.10.0-2516.10.0-2616.10.0-2716.10.0-2816.10.0-2916.10.0-316.10.0-3016.10.0-3116.10.0-3216.10.0-3316.10.0-3416.10.0-3516.10.0-3616.10.0-3716.10.0-3816.10.0-3916.10.0-416.10.0-4016.10.0-4116.10.0-4216.10.0-4316.10.0-4416.10.0-4516.10.0-4616.10.0-4716.10.0-4816.10.0-4916.10.0-516.10.0-5016.10.0-5116.10.0-616.10.0-716.10.0-8
None known
rack
RubyGems
3.0.0 up to 3.1.23, plus listed versions
3.0.13.0.103.0.113.0.123.0.13
Show 40 moreShow less
3.0.143.0.153.0.163.0.173.0.183.0.23.0.33.0.43.0.4.13.0.4.23.0.53.0.63.0.6.13.0.73.0.83.0.93.0.9.13.1.03.1.13.1.103.1.113.1.123.1.133.1.143.1.153.1.163.1.173.1.183.1.193.1.23.1.203.1.213.1.223.1.33.1.43.1.53.1.63.1.73.1.83.1.9
3.1.23
rack
RubyGems
3.2.0 up to 3.2.8, plus listed versions
3.2.13.2.23.2.33.2.43.2.53.2.63.2.7
3.2.8
ruby-rack
Ubuntu:Pro:14.04:LTS
All versions, plus listed versions
1.5.2-11.5.2-1ubuntu0.1~esm11.5.2-3+deb8u3ubuntu1~esm21.5.2-3+deb8u3ubuntu1~esm31.5.2-3+deb8u3ubuntu1~esm4
Show 6 moreShow less
1.5.2-3+deb8u3ubuntu1~esm61.5.2-3+deb8u3ubuntu1~esm71.5.2-3+deb8u3ubuntu1~esm81.5.2-3+deb8u3ubuntu1~esm91.5.2-3+deb8u3ubuntu1~esm101.5.2-3+deb8u3ubuntu1~esm11
None known
ruby-rack
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
1.5.2-41.6.4-21.6.4-31.6.4-3ubuntu0.11.6.4-3ubuntu0.2
Show 9 moreShow less
1.6.4-3ubuntu0.2+esm11.6.4-3ubuntu0.2+esm21.6.4-3ubuntu0.2+esm41.6.4-3ubuntu0.2+esm51.6.4-3ubuntu0.2+esm61.6.4-3ubuntu0.2+esm71.6.4-3ubuntu0.2+esm81.6.4-3ubuntu0.2+esm91.6.4-3ubuntu0.2+esm10
None known
Show 6 moreShow less
Affected packages
PackageAffectedFixed
ruby-rack
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
1.6.4-41.6.4-4ubuntu0.11.6.4-4ubuntu0.21.6.4-4ubuntu0.2+esm11.6.4-4ubuntu0.2+esm2
Show 7 moreShow less
1.6.4-4ubuntu0.2+esm41.6.4-4ubuntu0.2+esm51.6.4-4ubuntu0.2+esm61.6.4-4ubuntu0.2+esm71.6.4-4ubuntu0.2+esm81.6.4-4ubuntu0.2+esm91.6.4-4ubuntu0.2+esm10
None known
ruby-rack
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
2.0.6-32.0.7-22.0.7-2ubuntu0.12.0.7-2ubuntu0.1+esm12.0.7-2ubuntu0.1+esm2
Show 8 moreShow less
2.0.7-2ubuntu0.1+esm32.0.7-2ubuntu0.1+esm42.0.7-2ubuntu0.1+esm52.0.7-2ubuntu0.1+esm62.0.7-2ubuntu0.1+esm72.0.7-2ubuntu0.1+esm82.0.7-2ubuntu0.1+esm92.0.7-2ubuntu0.1+esm10
None known
ruby-rack
Ubuntu:Pro:22.04:LTS
All versions, plus listed versions
2.1.4-32.1.4-42.1.4-52.1.4-5ubuntu12.1.4-5ubuntu1+esm2
Show 10 moreShow less
2.1.4-5ubuntu1+esm32.1.4-5ubuntu1+esm42.1.4-5ubuntu1+esm52.1.4-5ubuntu1.12.1.4-5ubuntu1.1+esm12.1.4-5ubuntu1.1+esm22.1.4-5ubuntu1.22.1.4-5ubuntu1.2+esm12.1.4-5ubuntu1.2+esm22.1.4-5ubuntu1.2+esm3
None known
ruby-rack
Ubuntu:24.04:LTS
All versions, plus listed versions
2.2.4-32.2.7-12.2.7-1ubuntu0.12.2.7-1ubuntu0.22.2.7-1ubuntu0.3
Show 4 moreShow less
2.2.7-1ubuntu0.42.2.7-1ubuntu0.52.2.7-1ubuntu0.62.2.7-1ubuntu0.7
None known
ruby-rack
Ubuntu:26.10
All versions, plus listed versions
3.2.4-1ubuntu13.2.6-3
None known
ruby-rack
Ubuntu:26.04:LTS
All versions, plus listed versions
3.1.16-0.13.1.18-13.1.18-1build13.2.4-1ubuntu13.2.4-1ubuntu1.1
None known

What each source reports

CVE List Score used4.8

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

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.

Record
CVE-2026-125109
CVSS 3.1
4.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Weakness
CWE-1286
Updated
2026-11-09
EUVDEUVD-2026-1204824.8

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.

Record
EUVD-2026-120482
CVSS 3.1
4.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Updated
2026-11-10
GitHub AdvisoriesGHSA-2j8w-xcrc-x9854.8

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

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.
Record
GHSA-2j8w-xcrc-x985
CVSS 3.1
4.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Weakness
CWE-1286
Updated
2026-11-10
NVD4.8

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.

Record
CVE-2026-125109
CVSS 3.1
4.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Weakness
CWE-1286
Updated
2026-11-09
OSV4.8

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

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.

Record
CVE-2026-125109
CVSS 3.1
4.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Weakness
CWE-1286
Updated
2026-11-11
OSVDEBIAN-CVE-2026-1251094.8

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.

Record
DEBIAN-CVE-2026-125109
CVSS 3.1
4.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Updated
2026-11-10
OSVDHI-3kq5-h3bg-kafn-uxcd4.8

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…

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.

Record
DHI-3kq5-h3bg-kafn-uxcd
CVSS 3.1
4.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Updated
2026-11-16
OSVGHSA-2j8w-xcrc-x9854.8

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

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.
Record
GHSA-2j8w-xcrc-x985
CVSS 3.1
4.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Weakness
CWE-1286
Updated
2026-11-10
OSVUBUNTU-CVE-2026-1251094.8

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.

Record
UBUNTU-CVE-2026-125109
CVSS 3.1
4.8 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Updated
2026-11-13

History

History
RecordedChangedSources
affected, aliases, referencesOSV
affected, aliases, referencesOSV
publishedEUVD
publishedEUVD
affected, referencesOSV
affected, referencesGitHub Advisories
affected, aliases, facts, referencesOSV
aliases, referencesOSV
aliases, publishedEUVD, NVD
first indexedCVE List

Dates are when Every CVE recorded each change. Upstream dates may differ.

References

Show 10 moreShow less
This page doesn't list everything

Left out here: 1 version. The JSON record has them.

MoveEnter Open