Vulnerability in Sinatra
CVE-2025-61921
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.
Vulnerability class: ReDoS (Regular Expression Denial of Service)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
EPSS exploit prediction
EPSS: 0.005 (40.2th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 40th percentile — 40.2% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.005 · newest: 0.005 · change: +0.000
Affected products
- Sinatra — versions < 4.2.0
- Sinatrarb Sinatra
Weakness classification (CWE)
References
- github.com/sinatra/sinatra/security/advisories/GHSA-mr3q-g2mv-mr4q (Vendor Advisory)
- github.com/sinatra/sinatra/issues/2120 (Issue Tracking)
- github.com/sinatra/sinatra/pull/1823 (Exploit, Patch)
- github.com/sinatra/sinatra/pull/2121 (Patch)
- bugs.ruby-lang.org/issues/19104 (Issue Tracking)
Frequently asked questions
- What is CVE-2025-61921?
- CVE-2025-61921 is a high-severity vulnerability in Sinatra, classified under Inefficient Regular Expression Complexity. CVSS score: 7.5/10. Published 2025-10-10.
- How severe is CVE-2025-61921?
- High severity. CVSS v3 base score is 7.5 out of 10.