# CVE-2026-34830: Rack: Rack::Sendfile regex injection via HTTP_X_ACCEL_MAPPING header allows arbitrary file reads through nginx

- Severity: Medium 5.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/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.27%, higher than 21% of CVEs (2026-12-01)
- Published: 2026-04-02T16:47:40.490Z
- Modified: 2026-09-10T03:51:02.960Z
- Also known as: GHSA-qv7j-4883-hwh7
- Weaknesses: CWE-625
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Rack is a modular Ruby web server interface. Prior to versions 2.2.23, 3.1.21, and 3.2.6, Rack::Sendfile#map_accel_path interpolates the value of the X-Accel-Mapping request header directly into a regular expression when rewriting file paths for X-Accel-Redirect. Because the header value is not escaped, an attacker who can supply X-Accel-Mapping to the backend can inject regex metacharacters and control the generated X-Accel-Redirect response header. In deployments using Rack::Sendfile with x-accel-redirect, this can allow an attacker to cause nginx to serve unintended files from configured internal locations. This issue has been patched in versions 2.2.23, 3.1.21, and 3.2.6.

(As written by CVE List.)

## Affected

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

## Every score

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

## References

- <https://github.com/rack/rack/security/advisories/GHSA-qv7j-4883-hwh7> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-34830> (advisory)
- <https://github.com/rack/rack> (package)
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2026-34830.yml> (web)

## Sources

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

---

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