{"id":"CVE-2025-61921","aliases":["CVE-2025-61921","GHSA-mr3q-g2mv-mr4q"],"related":[],"kind":"vulnerability","state":"published","title":"Sinatra has ReDoS vulnerability in ETag header value generation","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThere 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.\n\n### Details\n\nCarefully 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.\n\n### Resources\n\n* https://github.com/sinatra/sinatra/issues/2120 (report)\n* https://github.com/sinatra/sinatra/pull/2121 (fix)\n* https://github.com/sinatra/sinatra/pull/1823 (older ReDoS vulnerability)\n* https://bugs.ruby-lang.org/issues/19104 (fix in Ruby >= 3.2)","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-10-10T19:28:10.688Z","modified":"2026-10-19T16:10:00.260Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":2.7,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":2.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-400","CWE-1333"],"affected":[{"ranges":[{"version":"< 4.2.0","status":"affected"}],"vendor":"sinatra","product":"sinatra","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.2.0"}],"ecosystem":"RubyGems","package":"sinatra","purl":"pkg:gem/sinatra","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"4.2.0"}],"vendor":"sinatrarb","product":"sinatra","cpe":"cpe:2.3:a:sinatrarb:sinatra:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/sinatra/sinatra/security/advisories/GHSA-mr3q-g2mv-mr4q","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sinatra/sinatra/issues/2120","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sinatra/sinatra/pull/1823","tags":["exploit","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sinatra/sinatra/pull/2121","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://bugs.ruby-lang.org/issues/19104","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-61921","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/sinatra/sinatra/commit/3fe8c38dc405586f7ad8f2ac748aa53e9c3615bd","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/sinatra/sinatra/commit/8ff496bd4877520599e1479d6efead39304edceb","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2025-61921.yml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/sinatra/sinatra","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2025-10-10T20:54:24.202Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-61921","url":"https://www.cve.org/CVERecord?id=CVE-2025-61921","licence":"CVE Terms of Use","modified":"2025-10-10T20:54:47.627Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mr3q-g2mv-mr4q","url":"https://github.com/advisories/GHSA-mr3q-g2mv-mr4q","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:30.082Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-61921","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-61921","licence":"Public domain","modified":"2026-10-19T16:10:00.260Z"}],"updatedAt":"2026-11-25T22:59:05.774Z","epss":{"score":0.00495,"percentile":0.44077,"date":"2026-12-01T12:00:22.000Z"}}