Skip to main content

CVE-2025-61770 — Vulnerability in rack — CVE Details

HIGH

Rack's unbounded multipart preamble buffering enables DoS (memory exhaustion)

Published October 7, 2025Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (1.36%). Schedule for your next planned update.

Does your project use an affected rack version?

Paste your Gemfile.lock to check it for CVE-2025-61770 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my Gemfile.lock

Summary

Summary

Rack::Multipart::Parser buffers the entire multipart preamble (bytes before the first boundary) in memory without any size limit. A client can send a large preamble followed by a valid boundary, causing significant memory use and potential process termination due to out-of-memory (OOM) conditions.

Details

While searching for the first boundary, the parser appends incoming data into a shared buffer (@sbuf.concat(content)) and scans for the boundary pattern:

@sbuf.scan_until(@body_regex)

If the boundary is not yet found, the parser continues buffering data indefinitely. There is no trimming or size cap on the preamble, allowing attackers to send arbitrary amounts of data before the first boundary.

Impact

Remote attackers can trigger large transient memory spikes by including a long preamble in multipart/form-data requests. The impact scales with allowed request sizes and concurrency, potentially causing worker crashes or severe slowdown due to garbage collection.

Mitigation

  • Upgrade: Use a patched version of Rack that enforces a preamble size limit (e.g., 16 KiB) or discards preamble data entirely per RFC 2046 § 5.1.1.
  • Workarounds:
    • Limit total request body size at the proxy or web server level.
    • Monitor memory and set per-process limits to prevent OOM conditions.

Advisory Timeline

  • First published October 7, 2025 (415 days ago).
  • Last revised September 10, 2026 — 337 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update rack to 2.2.19 or later
gem install rack -v 2.2.19
Bundler
Update rack to 3.1.17 or later
gem install rack -v 3.1.17
Bundler
Update rack to 3.2.2 or later
gem install rack -v 3.2.2

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (3)

Affects 1 ecosystem: RubyGems (1).

PackageFixed In
rack RubyGems · Affected: 0.1.0, 0.2.0, 0.3.0, 0.4.0 (+115 more)2.2.19
rack RubyGems · Affected: 3.1.0, 3.1.1, 3.1.10, 3.1.11 (+13 more)3.1.17
rack RubyGems · Affected: 3.2.0, 3.2.13.2.2

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-400
    Uncontrolled Resource ConsumptionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Frequently Asked Questions

What is CVE-2025-61770?
Rack's unbounded multipart preamble buffering enables DoS (memory exhaustion). This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
How do I check if my project is affected by CVE-2025-61770?
CVE-2025-61770 affects rack. It has a 1.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-61770 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
7.5

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
1.36%
EPSS percentile: 71.8

This is an above-median EPSS score — 71.8% of tracked vulnerabilities score at or below it, putting its exploitation likelihood in the upper half of the tracked corpus.

Also Known As

GHSA-p543-xpfm-54cp

Related CVEs

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Gemfile.lock