CVE-2025-61921Sinatra has ReDoS vulnerability in ETag header value generation
Sinatra is a domain-specific language for creating web applications in Ruby. In versions prior to 4.2.0, there is a denial of service vulnerability in the `If-Match` and `If-None-Match` header parsing component of Sinatra, if the `etag` method is used when constructing the response. Carefully crafted input can cause `If-Match` and `If-None-Match` header parsing in Sinatra to take an unexpected amount of time, possibly resulting in a denial of service attack vector. This header is typically involved in generating the `ETag` header value. Any applications that use the `etag` method when generating a response are impacted. Version 4.2.0 fixes the issue.
What to do
Fixed builds are available from Debian, RubyGems, Ubuntu: see the table below for the fixed version per release.
Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | ruby-sinatra | Fixed | 4.2.1-1 | UBUNTU-CVE-2025-61921 |
| Ubuntu 25.10 | ruby-sinatra | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | ruby-sinatra | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | ruby-sinatra | Fix pending | 2.0.8.1-2+deb11u1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2025-61921 |
| Ubuntu 18.04 | ruby-sinatra | Fix pending | 1.4.8-1ubuntu0.1~esm3 (Ubuntu Pro) | UBUNTU-CVE-2025-61921 |
| Ubuntu 16.04 | ruby-sinatra | Fix pending | 1.4.7-3ubuntu0.1~esm3 (Ubuntu Pro) | UBUNTU-CVE-2025-61921 |
| Debian 14 | ruby-sinatra | Fixed | 4.2.1-1 | DEBIAN-CVE-2025-61921 |
| Debian 13 | ruby-sinatra | Fix pending | DEBIAN-CVE-2025-61921 | |
| Debian 12 | ruby-sinatra | Fixed | 3.0.5-3+deb12u1 | DEBIAN-CVE-2025-61921 |
| Red Hat Enterprise Linux 10 | cockpit-ha-cluster | Not affected | ||
| Red Hat Enterprise Linux 10 | pcs | Not affected | ||
| Red Hat Enterprise Linux 10 | pcs-snmp | Not affected | ||
| Red Hat Enterprise Linux 9 | pcs | Not affected | ||
| Red Hat Enterprise Linux 9 | pcs-snmp | Not affected | ||
| Red Hat Enterprise Linux 8 | pcs | Fix pending Affected | ||
| Red Hat Enterprise Linux 8 | pcs-snmp | Fix pending Affected | ||
| Red Hat Enterprise Linux 7 | pcs | Not affected | ||
| Red Hat Enterprise Linux 7 | pcs-snmp | Not affected | ||
| Red Hat Enterprise Linux 7 | python-clufter | Not affected | ||
| RubyGems library | sinatra | Fixed | 4.2.0 | GHSA-mr3q-g2mv-mr4q |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- sinatra: affected: < 4.2.0
References
- https://github.com/sinatra/sinatra/security/advisories/GHSA-mr3q-g2mv-mr4q
- https://github.com/sinatra/sinatra/issues/2120
- https://github.com/sinatra/sinatra/pull/1823
- https://github.com/sinatra/sinatra/pull/2121
- https://bugs.ruby-lang.org/issues/19104
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.