CVE-2025-61921
Sinatra 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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
2.7
Sinatra 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.
- Record
CVE-2025-61921- CVSS 4.0
- 2.7 Low
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U - Weakness
- CWE-1333
- Updated
- 2026-11-02
EUVDEUVD-2025-33767
2.7
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.
- Record
EUVD-2025-33767- CVSS 4.0
- 2.7 Low
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-mr3q-g2mv-mr4q
2.7
Sinatra is vulnerable to ReDoS through ETag header value generation
Summary
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 and you are using Ruby < 3.2.
Details
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 if they are using Ruby below version 3.2.
Resources
- https://github.com/sinatra/sinatra/issues/2120 (report)
- https://github.com/sinatra/sinatra/pull/2121 (fix)
- https://github.com/sinatra/sinatra/pull/1823 (older ReDoS vulnerability)
- https://bugs.ruby-lang.org/issues/19104 (fix in Ruby >= 3.2)
- Record
GHSA-mr3q-g2mv-mr4q- CVSS 4.0
- 2.7 Low
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U - Weakness
- CWE-400, CWE-1333
- Updated
- 2026-11-02
NVD
2.7
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.
- Record
CVE-2025-61921- CVSS 4.0
- 2.7 Low
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSV
2.7
Sinatra 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.
- Record
CVE-2025-61921- CVSS 4.0
- 2.7 Low
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U - Weakness
- CWE-1333
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2025-61921
7.5
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.
- Record
DEBIAN-CVE-2025-61921- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVGHSA-mr3q-g2mv-mr4q
2.7
Sinatra is vulnerable to ReDoS through ETag header value generation
Summary
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 and you are using Ruby < 3.2.
Details
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 if they are using Ruby below version 3.2.
Resources
- https://github.com/sinatra/sinatra/issues/2120 (report)
- https://github.com/sinatra/sinatra/pull/2121 (fix)
- https://github.com/sinatra/sinatra/pull/1823 (older ReDoS vulnerability)
- https://bugs.ruby-lang.org/issues/19104 (fix in Ruby >= 3.2)
- Record
GHSA-mr3q-g2mv-mr4q- CVSS 4.0
- 2.7 Low
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U - Weakness
- CWE-1333, CWE-400
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2025-61921
2.7
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.
- Record
UBUNTU-CVE-2025-61921- CVSS 4.0
- 2.7 Low
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUSN-8624-1 No score
ruby-sinatra vulnerability
It was discovered that Sinatra did not properly handle header parsing, causing ETag generation to hang when given specific input. A remote attacker could possibly use this issue to cause a denial of service.
- Record
USN-8624-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
sinatraRubyGems |
before 4.2.0 | 4.2.0 |
ruby-sinatraDebian:12 |
before 3.0.5-3+deb12u1, plus listed versions 3.0.5-3 |
3.0.5-3+deb12u1 |
ruby-sinatraDebian:13 |
All versions, plus listed versions 4.1.1-54.1.1-64.2.1-14.2.1-24.2.1-34.2.1-44.2.1-5 |
None known |
ruby-sinatraDebian:14 |
before 4.2.1-1, plus listed versions 4.1.1-54.1.1-6 |
4.2.1-1 |
sinatraRubyGems |
before 4.2.0, plus listed versions 0.1.00.1.50.1.60.1.70.2.0 Show 45 moreShow less0.2.10.2.20.3.00.3.10.3.20.3.30.9.00.9.0.10.9.0.20.9.0.30.9.0.40.9.0.50.9.10.9.1.10.9.20.9.40.9.50.9.61.01.0.a1.0.b1.1.01.1.21.1.31.1.41.1.a1.1.b1.2.01.2.0.a1.2.0.c1.2.0.d1.2.11.2.21.2.31.2.61.2.71.2.81.2.91.3.01.3.0.a1.3.0.b1.3.0.c1.3.0.d1.3.0.e1.3.0.f |
4.2.0 |
ruby-sinatraUbuntu:Pro:16.04:LTS |
before 1.4.7-3ubuntu0.1~esm3, plus listed versions 1.4.6-21.4.7-31.4.7-3ubuntu0.1~esm2 |
1.4.7-3ubuntu0.1~esm3 |
ruby-sinatraUbuntu:Pro:18.04:LTS |
before 1.4.8-1ubuntu0.1~esm3, plus listed versions 1.4.7-51.4.8-11.4.8-1ubuntu0.1~esm2 |
1.4.8-1ubuntu0.1~esm3 |
ruby-sinatraUbuntu:Pro:22.04:LTS |
before 2.0.8.1-2+deb11u1ubuntu0.1~esm1, plus listed versions 2.0.8.1-22.0.8.1-2+deb11u1build0.22.04.1 |
2.0.8.1-2+deb11u1ubuntu0.1~esm1 |
ruby-sinatraUbuntu:26.04:LTS |
before 4.2.1-1, plus listed versions 4.1.1-5 |
4.2.1-1 |
ruby-sinatraUbuntu:Pro:20.04:LTS |
before 2.0.8.1-1ubuntu0.1~esm3, plus listed versions 2.0.5-4ubuntu12.0.8.1-12.0.8.1-1ubuntu0.1~esm2 |
2.0.8.1-1ubuntu0.1~esm3 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-61921 is a low vulnerability (CVSS 2.7) in Sinatra, published October 10, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.50%, the 42nd percentile. Fixed in sinatra 4.2.0.
References
github.com/sinatra/sinatra/security/advisories/GHSA-mr3q-g2mv-mr4q
github.com/sinatra/sinatra/issues/2120
github.com/sinatra/sinatra/pull/1823
github.com/sinatra/sinatra/pull/2121
bugs.ruby-lang.org/issues/19104
github.com/sinatra/sinatra/commit/3fe8c38dc405586f7ad8f2ac748aa53e9c3615bd
Show 10 moreShow less
github.com/sinatra/sinatra/commit/8ff496bd4877520599e1479d6efead39304edceb
nvd.nist.gov/vuln/detail/CVE-2025-61921
github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2025-61921.yml
github.com/advisories/GHSA-mr3q-g2mv-mr4q
github.com/CVEProject/cvelistV5/tree/main/cves/2025/61xxx/CVE-2025-61921.json
security-tracker.debian.org/tracker/CVE-2025-61921
github.com/sinatra/sinatra
ubuntu.com/security/CVE-2025-61921
cve.org/CVERecord?id=CVE-2025-61921
ubuntu.com/security/notices/USN-8624-1
Left out here: 56 versions. The JSON record has them.