{"id":"CVE-2026-34830","published":"2026-04-02T16:47:40Z","modified":"2026-04-02T18:59:46Z","title":"Rack: Rack::Sendfile regex injection via HTTP_X_ACCEL_MAPPING header allows arbitrary file reads through nginx","vendor":"rack","product":"rack","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00248,"percentile":0.16436,"provenance":"source"},"cwes":[{"id":"CWE-625","name":"Permissive Regular Expression"}],"references":[{"url":"https://github.com/rack/rack/security/advisories/GHSA-qv7j-4883-hwh7","tags":["x_refsource_CONFIRM"]}],"priority":{"score":7.4,"factors":[{"name":"EPSS percentile","points":3.29},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"rack","affectedVersions":[{"vendor":"rack","product":"rack","versions":["< 2.2.23",">= 3.0.0.beta1, < 3.1.21",">= 3.2.0, < 3.2.6"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-02T18:59:36.006369Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"rack","vulnerableRanges":["<2.2.23",">=3.0.0.beta1, <3.1.21",">=3.2.0, <3.2.6"],"patched":["2.2.23","3.1.21","3.2.6"],"from":["GHSA-qv7j-4883-hwh7"],"provenance":"source"}],"summary":{"text":"Rack::Sendfile in the Rack Ruby web server interface, specifically its map_accel_path method, interpolates the X-Accel-Mapping request header unescaped into a regular expression used to build X-Accel-Redirect paths, so regex metacharacters in that header are not neutralised. An attacker who can supply that header to the backend, in deployments using Rack::Sendfile with x-accel-redirect, can use it to make nginx serve unintended files from configured internal locations, with no authentication or user interaction required but high attack complexity.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:15:29Z"},"euvd":{"id":"EUVD-2026-18390","exploited":false,"provenance":"source"}}