CVE-2026-125108
Rack: Multipart boundary ambiguity guard in Rack::Multipart::Parser can be bypassed with a quoted boundary value, allowing WAF bypass
Also known as GHSA-p8x9-v4hv-2w4g
Mitigation
- Upgrade rack to one of 2.2.25, 3.1.23, 3.2.8 (or later in the same release line).
Who should check
- Projects that depend on RubyGems package rack (< 2.2.25)
Vulnerability facts
- Affected
- rack < 2.2.25
- Fixed in
- 2.2.25, 3.1.23, 3.2.8
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 3.7 (v3.1, GitHub)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: Low
- Availability impact: None
- EPSS
- 0.39% chance of exploitation in 30 days (percentile 24, 2026-11-26)
- CWE
- CWE-436
- Modified
Description
## Summary The guard added for CVE-2026-26961 (GHSA-vgpv-f759-9wx3), which rejects multipart requests with more than one `boundary` parameter, only inspects the part of the `Content-Type` header after the boundary it extracts. A `Content-Type` whose first `boundary` parameter is empty or begins with a quote, semicolon, or comma is skipped by the extraction pattern, so a second `boundary` parameter is accepted silently and Rack parses the body with a boundary that a conforming parser would not derive from the header. ## Details `Rack::Multipart::Parser.parse_boundary` extracts the boundary with a regular expression that uses a lazy prefix and a value class excluding `"`, `;`, and `,`. For a header such as `multipart/form-data; boundary=";boundary=AaB03x"` or `multipart/form-data; boundary=; boundary=AaB03x`, the pattern skips the first `boundary=` and anchors on the second, and the subsequent check for another `boundary=` in the remaining text finds nothing. Rack then uses `AaB03x`. RFC 9110 parses the first header as a single parameter whose value is `;boundary=AaB03x`, which is not a legal boundary under RFC 2046, so the only conformant outcome is rejection. Inspecting intermediaries that implement the standard grammar, such as ModSecurity, see a different boundary or no multipart body at all. The fix counts `boundary=` occurrences across the entire header value and rejects the request when there is more than one. ## Impact As with CVE-2026-26961, an attacker can craft a multipart request that a web application firewall or other inspecting proxy in front of a Rack application interprets differently from Rack, so form fields and file uploads reach the application without inspection. Rack itself grants no capability beyond that of a well-formed request with the same body. All supported versions, including 2.2, are affected. ## Mitigation * Update to a patched version of Rack. * Reject requests whose `Content-Type` contains more than one `boundary` parameter at the reverse proxy.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| RubyGems rack | < 2.2.25 | 2.2.25, 3.1.23, 3.2.8 | ghsa |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-125108. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-125108.md Affected: rack < 2.2.25 Fixed in: 2.2.25, 3.1.23, 3.2.8 Steps: 1. Search this machine and project for rack (RubyGems): dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
Technologies
References
Vendor advisories
Patches
Other
- https://nvd.nist.gov/vuln/detail/CVE-2026-125108
- https://github.com/rack/rack/releases/tag/v2.2.25
- https://github.com/rack/rack/releases/tag/v3.1.23
- https://github.com/rack/rack/releases/tag/v3.2.8
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/GHSA-p8x9-v4hv-2w4g.yml
- https://github.com/advisories/GHSA-p8x9-v4hv-2w4g
FAQ
Is CVE-2026-125108 being exploited?
There is no confirmed exploitation: CVE-2026-125108 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.39% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-125108?
Low: CVSS 3.7 (v3.1, scored by GitHub). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2026-125108?
rack < 2.2.25.
Is there a fix for CVE-2026-125108?
Yes. Fixed in 2.2.25, 3.1.23, 3.2.8. Upgrade rack to one of 2.2.25, 3.1.23, 3.2.8 (or later in the same release line).
How do I check if I'm affected by CVE-2026-125108?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.
More rack vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| HIGH 8.7 | CVE-2026-125111 Rack: Multipart parsing allows DoS via unbounded scan buffer growth | RubyGems | EPSS 46% | |
| MEDIUM 4.8 | CVE-2026-125109 Rack: Rack::Request#host_with_port (and #base_url / #url) return the raw invalid Host header — incomplete fix of CVE-2026-34835 | RubyGems | EPSS 21% | |
| MEDIUM 5.3 | CVE-2026-125110 Rack: Rack::Static header_rules bypass via dot-segment normalization mismatch | RubyGems | EPSS 29% |