Sinatra is vulnerable to ReDoS through ETag header value generation
Description
Published by the National Vulnerability Database
Oct 10, 2025
Published to the GitHub Advisory Database
Oct 10, 2025
Reviewed
Oct 10, 2025
Last updated
Oct 13, 2025
Summary
There is a denial of service vulnerability in the
If-MatchandIf-None-Matchheader parsing component of Sinatra, if theetagmethod is used when constructing the response and you are using Ruby < 3.2.Details
Carefully crafted input can cause
If-MatchandIf-None-Matchheader 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 theETagheader value. Any applications that use theetagmethod when generating a response are impacted if they are using Ruby below version 3.2.Resources
References