CVE-2025-61921
JSON

2.7low

Sinatra has ReDoS vulnerability in ETag header value generation

Severity
2.7low CVSS:4.0 by GitHub_M
Exploit likelihood
0.50% (higher than 44% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-mr3q-g2mv-mr4q

Description

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.

Affected

Product or packageVersionsReported by
sinatra sinatra< 4.2.0CVE List
sinatra (RubyGems)before 4.2.0GitHub Advisory Database
sinatrarb sinatrabefore 4.2.0NVD

All scores

GitHub_M2.7low CVSS:4.0CVSS: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
GitHublow CVSS:4.0CVSS: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
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-400CWE-1333

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
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
NVD (es)

Sinatra es un lenguaje de dominio específico para crear aplicaciones web en Ruby. En versiones anteriores a la 4.2.0, existe una vulnerabilidad de denegación de servicio en el componente de análisis de las cabeceras 'If-Match' e 'If-None-Match' de Sinatra, si se utiliza el método 'etag' al construir la respuesta. Una entrada cuidadosamente elaborada puede hacer que el análisis de las cabeceras 'If-Match' e 'If-None-Match' en Sinatra tarde una cantidad de tiempo inesperada, lo que podría resultar en un vector de ataque de denegación de servicio. Esta cabecera suele estar implicada en la generación del valor de la cabecera 'ETag'. Cualquier aplicación que utilice el método 'etag' al generar una respuesta se ve afectada. La versión 4.2.0 soluciona el problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-61921 changed 2025-10-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-mr3q-g2mv-mr4q changed 2026-09-10CC-BY-4.0
NVDCVE-2025-61921 changed 2026-10-19Public domain