Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-34829

Rack's multipart parsing without Content-Length header allows unbounded chunked file uploads
Back to all
CVE

CVE-2026-34829

Rack's multipart parsing without Content-Length header allows unbounded chunked file uploads

Summary

Rack::Multipart::Parser only wraps the request body in a BoundedIO when CONTENT_LENGTH is present. When a multipart/form-data request is sent without a Content-Length header, such as with HTTP chunked transfer encoding, multipart parsing continues until end-of-stream with no total size limit.

For file parts, the uploaded body is written directly to a temporary file on disk rather than being constrained by the buffered in-memory upload limit. An unauthenticated attacker can therefore stream an arbitrarily large multipart file upload and consume unbounded disk space.

This results in a denial of service condition for Rack applications that accept multipart form data.

Details

Rack::Multipart::Parser.parse applies BoundedIO only when content_length is not nil:

io = BoundedIO.new(io, content_length) if content_length

When CONTENT_LENGTH is absent, the parser reads the multipart body until EOF without a global byte limit.

Although Rack enforces BUFFEREDUPLOADBYTESIZE_LIMIT for retained non-file parts, file uploads are handled differently. When a multipart part includes a filename, the body is streamed to a Tempfile, and the retained-size accounting is not applied to that file content. As a result, file parts are not subject to the same upload size bound.

An attacker can exploit this by sending a chunked multipart/form-data request containing a file part and continuously streaming data without declaring a Content-Length. Rack will continue writing the uploaded data to disk until the client stops or the server exhausts available storage.

Impact

Any Rack application that accepts multipart/form-data uploads may be affected if no upstream component enforces a request body size limit.

An unauthenticated attacker can send a large chunked file upload to consume disk space on the application host. This may cause request failures, application instability, or broader service disruption if the host runs out of available storage.

The practical impact depends on deployment architecture. Reverse proxies or application servers that enforce upload limits may reduce or eliminate exploitability, but Rack itself does not impose a total multipart upload limit in this code path when CONTENT_LENGTH is absent.

Mitigation

  • Update to a patched version of Rack that enforces a total multipart upload size limit even when CONTENT_LENGTH is absent.
  • Enforce request body size limits at the reverse proxy or application server.
  • Isolate temporary upload storage and monitor disk consumption for multipart endpoints.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
7.5
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
C
H
U
0
-
3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
C
H
U
-

Related Resources

No items found.

References

https://github.com/rack/rack/security/advisories/GHSA-8vqr-qjwx-82mw, https://nvd.nist.gov/vuln/detail/CVE-2026-34829, https://github.com/rack/rack, https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2026-34829.yml

Severity

7.5

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
7.5
EPSS Probability
0.00068%
EPSS Percentile
0.21079%
Introduced Version
0,3.0.0.beta1,3.2.0
Fix Available
2.2.23,3.1.21,3.2.6,18.10.3-r0,18.8.9-r0,18.9.5-r0,18.10.4-r0,18.8.10-r0,18.9.6-r0,1.18.2-r67,8.19.14-r3,9.0.8-r20,9.1.10-r6,9.2.8-r2,9.3.3-r2,2.137.0.2.118.0-r4,2.137.0.2.118.0-r2,2.2.23-r0,7.2.3.1-r2,8.0.5-r0,7.2.3.1-r1,8.0.5-r2

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading