Sinatra has ReDoS vulnerability in ETag header value generation
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Partial Red Hat: 2 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-1333.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| sinatra | sinatra | before 4.2.0 | 4.2.0 | Patch available | CNA |
| — | sinatra (RubyGems) | before 4.2.0 | 4.2.0 | Patch available | GHSA-mr3q-g2mv-mr4q |
- sinatra Vendorsinatra Affected before 4.2.0 Fixed in 4.2.0 Patch available CNA
- sinatra (RubyGems) Vendor— Affected before 4.2.0 Fixed in 4.2.0 Patch available GHSA-mr3q-g2mv-mr4q
Remediation
- Fix · CNA sinatra (sinatra) Fixed in 4.2.0
- Fix · GHSA-mr3q-g2mv-mr4q sinatra (RubyGems) Fixed in 4.2.0 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat 3scale API Management Platform 2 | Affected | No fix planned: Will not fix |
| Red Hat Enterprise Linux 8 | Affected | No fix yet |
Not affected: 3 products
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 9
Timeline
- 2026-10-02 Threatist record created from CVE-2025-61921
- 2026-10-03 Alias added: GHSA-mr3q-g2mv-mr4q
References
Advisory 2
Other 6
- https://github.com/sinatra/sinatra/issues/2120
- https://bugs.ruby-lang.org/issues/19104
- https://github.com/sinatra/sinatra/commit/3fe8c38dc405586f7ad8f2ac748aa53e9c3615bd
- https://github.com/sinatra/sinatra/commit/8ff496bd4877520599e1479d6efead39304edceb
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2025-61921.yml
- https://github.com/sinatra/sinatra
More Sinatrarb Sinatra vulnerabilities
- TI-2022-22408 Sinatra vulnerable to Reflected File Download attack CVSS 3.1HIGH 8.8
- TI-2022-12310 Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files. CVSS 3.1HIGH 7.5
- TI-2018-08315 Sinatra before 2.0.2 has XSS via the 400 Bad Request page that occurs upon a params parser exception. CVSS 3.0MEDIUM 6.1
- TI-2018-05228 An issue was discovered in rack-protection/lib/rack/protection/path_traversal.rb in… CVSS 3.0MEDIUM 5.3
Sources
- CVE-2025-61921 · CVE Program
- CVE-2025-61921 · NVD
- FIRST EPSS
- GHSA-mr3q-g2mv-mr4q · GitHub Advisory Database · CC BY 4.0
- CVE-2025-61921 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences