Sinatra
CVE-2025-61921
LOW
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend request with crafted If-None-Match header
-
ExploitTrigger catastrophic regex backtracking in ETag parsing
-
ImpactExhaust CPU and degrade availability
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity limits
MITRE ATT&CK
1 technique across 1 tactic: Impact The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three concrete conditions to all hold: (1) the application must call Sinatra's etag method when constructing a response, which drives parsing of client-supplied If-Match / If-None-Match headers; (2) the underlying Ruby runtime must be below version 3.2, since Ruby 3.2+ fixed the regex engine behavior (bugs.ruby-lang.org/issues/19104) that enables the catastrophic backtracking; and (3) the attacker must reach the affected endpoint with a controlled If-Match/If-None-Match header. Limiting factors: applications on Ruby >= 3.2 are not affected even on vulnerable Sinatra versions, and applications that never use etag are not impacted - so despite the unauthenticated network vector, realistic exposure is confined to older-Ruby deployments using ETag generation. |
| Impact | This is a low-severity, low-priority issue despite being network-reachable and unauthenticated. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) describes remote, low-complexity, unauthenticated reachability, but the only impact is VA:L - a partial, bounded availability degradation (ReDoS CPU consumption), with no confidentiality or integrity impact (VC:N/VI:N) - yielding the low base score of 2.7. EPSS is modest at 0.50% (41st percentile), consistent with a low-impact DoS that is not an attractive mass-exploitation target. There is NO CISA KEV listing, so exploitation status is: no public exploit identified at time of analysis - note that although the input marks a reference as 'exploit', that reference (PR 1823) is actually the fix for an OLDER, separate ReDoS issue per the GHSA advisory, not weaponized exploit code for this CVE, so POC availability for CVE-2025-61921 specifically is not substantiated by the provided evidence. Signals are therefore consistent (low CVSS + low EPSS + no KEV = genuinely low real-world risk), with one important caveat the NVD data omits: the GHSA advisory states exploitation requires Ruby < 3.2, which substantially narrows the exposed population versus what the NVD description implies. |
| Exploit ScenarioDerived | A remote, unauthenticated attacker sends an HTTP request containing a specially crafted If-Match or If-None-Match header to a public Sinatra endpoint whose handler calls the etag method while running on Ruby < 3.2. The pathological input triggers catastrophic regular-expression backtracking during header parsing, consuming excessive CPU and degrading or temporarily denying service. No confirmed working PoC for this specific CVE is provided (the referenced 'exploit' link is a fix for an earlier, distinct ReDoS). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Denial of service in Sinatra versions prior to 4.2.0 allows unauthenticated remote attackers to consume excessive CPU time by sending crafted If-Match or If-None-Match headers to endpoints that call the etag helper, potentially degrading availability. Exploitation is constrained: the application must use the etag method and run on Ruby below 3.2, because Ruby 3.2+ corrected the regex behavior that enables catastrophic backtracking. Publicly available exploit code exists and EPSS is approximately 0.5% at the 41st percentile; the issue is not in CISA KEV. Assessed severity is low, with CVSS 3.1 vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
RemediationAI
Upgrade Sinatra to 4.2.0, the vendor-released patch version, as documented in GHSA-mr3q-g2mv-mr4q and fixed by PR https://github.com/sinatra/sinatra/pull/2121. If upgrading is not immediately possible, move the application to Ruby 3.2 or later, which fixes the underlying regex behavior referenced in https://bugs.ruby-lang.org/issues/19104, or stop using the etag helper and filter or cap client-supplied If-Match and If-None-Match headers at a reverse proxy; the Ruby upgrade requires compatibility testing, disabling etag loses HTTP caching benefits, and header filtering may break legitimate conditional requests. Public exploit code is available, EPSS is low at roughly 0.5% at the 41st percentile, and the issue is not known to be actively exploited in CISA KEV. Patch status: Vendor-released patch: 4.2.0.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in rubygems
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Sinatra is a Ruby domain-specific language for building web applications. Its etag helper generates an ETag response header, and the framework parses client-supplied If-Match and If-None-Match headers to evaluate conditional requests. In affected versions, the header parsing uses a regular expression vulnerable to inefficient regular expression complexity (CWE-1333), so crafted header values can trigger catastrophic backtracking and excessive CPU consumption. The flaw is only exploitable on Ruby versions below 3.2; Ruby 3.2 addressed the underlying regex engine behavior in bugs.ruby-lang.org/issues/19104. Sinatra 4.2.0 contains the parsing fix in PR 2121, while PR 1823 corresponds to an earlier ReDoS hardening effort. The CPE cpe:2.3:a:sinatrarb:sinatra:*:*:*:*:*:*:*:* covers Sinatra releases before 4.2.0.
Know when Sinatra gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Remotely reachable via unauthenticated HTTP headers with low complexity (AV:N/AC:L/PR:N/UI:N); only bounded availability degradation (A:L) with no confidentiality or integrity impact.
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Affected Products (CPE)CVE.org
Sinatra is a domain-specific language for creating web applications in Ruby. Rated high severity (CVSS 8.8), this vulner
Sinatra before 2.0.2 has XSS via the 400 Bad Request page that occurs upon a params parser exception. Rated medium sever
Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files. Rated high s
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in sinatrateam
An issue was discovered in rack-protection/lib/rack/protection/path_traversal.rb in Sinatra 2.x before 2.0.1 on Windows.
NVD
CVE.org
EPSS
GitHub
Exploit-DB