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)

EPSS: 0.005 (37.3th percentile) — read the EPSS interpretation.

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.

Affected products

Weakness classification (CWE)

References

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.