CVE-2026-34835 Rack: `Rack::Request` accepts invalid Host characters, enabling host allowlist bypass.
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.
| Package | Affected | Fixed in |
|---|---|---|
rack RubyGems | From 3.0.0.beta1 | 3.1.21 |
rack RubyGems | From 3.0.0.beta1 | 3.1.21 |
rack RubyGems | From 3.2.0 | 3.2.6 |
rack RubyGems | From 3.2.0 | 3.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.
Other vulnerabilities in rack
- CVE-2026-34785 Rack: Local file inclusion in `Rack::Static` via URL Prefix Matching
- CVE-2026-34827 Rack: Algorithmic-Complexity DoS in Rack::Multipart::Parser
- CVE-2026-34829 Rack: Denial of Service via Unbounded Multipart File Upload Without Content-Length
- CVE-2026-22860 Rack has a Directory Traversal via Rack:Directory
- CVE-2025-61919 Rack is vulnerable to a memory-exhaustion DoS through unbounded URL-encoded body parsing
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.