CVE-2026-34230

Rack: Quadratic complexity in Rack::Utils.select_best_encoding via wildcard Accept-Encoding header

Published Apr 2, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
Rack is a modular Ruby web server interface. Prior to versions 2.2.23, 3.1.21, and 3.2.6, Rack::Utils.select_best_encoding processes Accept-Encoding values with quadratic time complexity when the header contains many wildcard (*) entries. Because this method is used by Rack::Deflater to choose a response encoding, an unauthenticated attacker can send a single request with a crafted Accept-Encoding header and cause disproportionate CPU consumption on the compression middleware path. This results in a denial of service condition for applications using Rack::Deflater. This issue has been patched in versions 2.2.23, 3.1.21, and 3.2.6.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4706-1 ruby-rack security update
Debian DSA Debian DSA DSA-6492-1 ruby-rack security update
Github GHSA Github GHSA GHSA-v569-hp3g-36wr Rack has quadratic complexity in Rack::Utils.select_best_encoding via wildcard Accept-Encoding header
Ubuntu USN Ubuntu USN USN-8182-1 Rack vulnerabilities
Ubuntu USN Ubuntu USN USN-8989-1 Rack vulnerabilities
History
Type Values Removed Values Added
CPEs cpe:2.3:a:rack:rack:*:*:*:*:*:ruby:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Rack
Rack rack
Vendors & Products Rack
Rack rack
Type Values Removed Values Added
Description Rack is a modular Ruby web server interface. Prior to versions 2.2.23, 3.1.21, and 3.2.6, Rack::Utils.select_best_encoding processes Accept-Encoding values with quadratic time complexity when the header contains many wildcard (*) entries. Because this method is used by Rack::Deflater to choose a response encoding, an unauthenticated attacker can send a single request with a crafted Accept-Encoding header and cause disproportionate CPU consumption on the compression middleware path. This results in a denial of service condition for applications using Rack::Deflater. This issue has been patched in versions 2.2.23, 3.1.21, and 3.2.6.
Title Rack: Quadratic complexity in Rack::Utils.select_best_encoding via wildcard Accept-Encoding header
Weaknesses CWE-400
CWE-407
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Apr 3, 2026, 6:19 PM
Reserved
Mar 26, 2026, 4:22 PM
Status
Analyzed
Published
Apr 2, 2026, 5:16 PM
Modified
Jul 24, 2026, 9:10 PM
Severity
Moderate
Public date
Apr 2, 2026, 4:41 PM