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

- Severity: Medium 4.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-02)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-02T17:09:07.047Z
- Modified: 2026-09-10T03:50:44.295Z
- Also known as: GHSA-g2pf-xv49-m2h5
- Weaknesses: CWE-1286
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- rack rack: >= 3.0.0.beta1, < 3.1.21; >= 3.2.0, < 3.2.6; from 3.0.0 before 3.1.21; from 3.2.0 before 3.2.6
- rack (RubyGems): from 3.0.0.beta1 before 3.1.21; from 3.2.0 before 3.2.6

## Every score

- GitHub_M: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`
- GitHub: CVSS:3.1 4.8 Medium `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`

## References

- <https://github.com/rack/rack/security/advisories/GHSA-g2pf-xv49-m2h5> (exploit, mitigation, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-34835> (advisory)
- <https://github.com/rack/rack> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2026-34835.yml> (web)

## Sources

- CVE List: [CVE-2026-34835](https://www.cve.org/CVERecord?id=CVE-2026-34835), CVE Terms of Use, modified 2026-04-02
- GitHub Advisory Database: [GHSA-g2pf-xv49-m2h5](https://github.com/advisories/GHSA-g2pf-xv49-m2h5), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-34835](https://nvd.nist.gov/vuln/detail/CVE-2026-34835), Public domain, modified 2026-07-24

---

Page: https://cve.day/CVE-2026-34835 · Whole record: https://cve.day/CVE-2026-34835.json · Rebuilt by cve.day 2026-11-25T22:59:17.834Z
