CVE-2026-34835 Rack: `Rack::Request` accepts invalid Host characters, enabling host allowlist bypass.

Medium 4.8 Published Updated

Attackers can bypass host allowlists in Rack applications by sending invalid Host header characters, potentially enabling host header poisoning.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-34835?

CVE-2026-34835 is a medium-severity vulnerability in rack, published on 2 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Rack is a modular Ruby web server interface. From versions 3.0.0.beta1 to before 3.1.21, and 3.2.0 to before 3.2.6, Rack::Request parses the Host header using an AUTHORITY regular expression that accepts characters not permitted in RFC-compliant hostnames, including /, ?, #, and @. Because req.host returns the full parsed value, applications that validate hosts using naive prefix or suffix checks can be bypassed. This can lead to host header poisoning in applications that use req.host, req.url, or req.base_url for link generation, redirects, or origin validation. This issue has been patched in versions 3.1.21 and 3.2.6.

Weakness: CWE-1286

Which versions are affected by CVE-2026-34835?

4 open source packages ship an affected version, including rack. It affects 1 product.

PackageAffectedFixed in
rack RubyGemsFrom 3.0.0.beta13.1.21
rack RubyGemsFrom 3.0.0.beta13.1.21
rack RubyGemsFrom 3.2.03.2.6
rack RubyGemsFrom 3.2.03.2.6

Products include Rack Rack.

How do I fix CVE-2026-34835?

Upgrade rack to a fixed version for your release line: 3.1.21 or 3.2.6.

Is CVE-2026-34835 being exploited?

There is no known exploitation of CVE-2026-34835 in the wild and no public exploit code.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as DEBIAN-CVE-2026-34835, GHSA-g2pf-xv49-m2h5, MINI-2wff-rm7x-5hhg, MINI-2x4c-p5cr-7823, MINI-522x-4979-h862, MINI-5jgj-hqwr-mr89 and 8 more.

Is CVE-2026-34835 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free