CVE-2025-61772: Rack's multipart parser buffers unbounded per-part headers, enabling DoS (memory exhaustion)

Published Oct 7, 2025
·
Updated

Summary

Rack::Multipart::Parser can accumulate unbounded data when a multipart part’s header block never terminates with the required blank line (CRLFCRLF). The parser keeps appending incoming bytes to memory without a size cap, allowing a remote attacker to exhaust memory and cause a denial of service (DoS).

Details

While reading multipart headers, the parser waits for CRLFCRLF using:

ruby @sbuf.scanuntil(/(.?\r\n)\r\n/m)

If the terminator never appears, it continues appending data (@sbuf.concat(content)) indefinitely. There is no limit on accumulated header bytes, so a single malformed part can consume memory proportional to the request body size.

Impact

Attackers can send incomplete multipart headers to trigger high memory use, leading to process termination (OOM) or severe slowdown. The effect scales with request size limits and concurrency. All applications handling multipart uploads may be affected.

Mitigation

Upgrade to a patched Rack version that caps per-part header size (e.g., 64 KiB). Until then, restrict maximum request sizes at the proxy or web server layer (e.g., Nginx clientmaxbodysize).

Other sources

Rack is a modular Ruby web server interface. In versions prior to 2.2.19, 3.1.17, and 3.2.2, Rack::Multipart::Parser can accumulate unbounded data when a multipart part’s header block never terminates with the required blank line (CRLFCRLF). The parser keeps appending incoming bytes to memory without a size cap, allowing a remote attacker to exhaust memory and cause a denial of service (DoS). Attackers can send incomplete multipart headers to trigger high memory use, leading to process termination (OOM) or severe slowdown. The effect scales with request size limits and concurrency. All applications handling multipart uploads may be affected. Versions 2.2.19, 3.1.17, and 3.2.2 cap per-part header size (e.g., 64 KiB). As a workaround, restrict maximum request sizes at the proxy or web server layer (e.g., Nginx clientmaxbodysize).

MITRE

Affected Software

8 affected componentsFixes available
Rack Rack<2.2.19, <3.1.17, <3.2.2
Rack Rack Ruby<2.2.19
Rack Rack Ruby>=3.1.0<3.1.17
Rack Rack Ruby>=3.2.0<3.2.2
rubygems/rack>=3.2<3.2.2
3.2.2
rubygems/rack>=3.1<3.1.17
3.1.17
rubygems/rack<2.2.19
2.2.19
IBM Aspera Console<=3.4.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rubygems/rack to a version that resolves this vulnerability.

    Fixed in 3.2.2
  2. Upgrade

    Upgrade rubygems/rack to a version that resolves this vulnerability.

    Fixed in 3.1.17
  3. Upgrade

    Upgrade rubygems/rack to a version that resolves this vulnerability.

    Fixed in 2.2.19
  4. Upgrade

    Upgrade Rack::Multipart::Parser to a version that resolves this vulnerability.

    Fixed in 2.2.19
  5. Upgrade

    Upgrade Rack::Multipart::Parser to a version that resolves this vulnerability.

    Fixed in 3.1.17
  6. Upgrade

    Upgrade Rack::Multipart::Parser to a version that resolves this vulnerability.

    Fixed in 3.2.2
  7. Configuration

    As a workaround until the Rack upgrade is applied, restrict maximum request sizes at the proxy/web server layer; for Nginx, set `client_max_body_size` to limit multipart upload request sizes.

    Nginx client_max_body_size = (set to a maximum appropriate for your application)

Event History

Oct 7, 2025
CVE Published
via MITRE·03:02 PM
Data Sourced
via MITRE·03:02 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Data Sourced
via Red Hat·04:02 PM
DescriptionSeverityAffected Software
Advisory Published
via GitHub·05:28 PM
Data Sourced
via GitHub·05:28 PM
DescriptionSeverityWeaknessAffected Software
Jan 8, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2025-61772?

CVE-2025-61772 is classified as a high severity vulnerability due to its potential to cause unbounded data accumulation.

2

How do I fix CVE-2025-61772?

To fix CVE-2025-61772, update Rack to version 2.2.19, 3.1.17, or 3.2.2 or later.

3

What versions of Rack are affected by CVE-2025-61772?

CVE-2025-61772 affects Rack versions prior to 2.2.19, 3.1.17, and 3.2.2.

4

What is the impact of CVE-2025-61772 on applications using Rack?

The impact of CVE-2025-61772 can lead to excessive memory consumption and potential denial of service if the multipart part's header block does not terminate correctly.

5

Is CVE-2025-61772 a remote vulnerability?

CVE-2025-61772 can be exploited remotely if the application is accepting multipart requests from untrusted sources.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203