Sinatra
cpe:2.3:a:sinatrarb:sinatra:*:*:*:*:*:*:*
- < 4.2.0
A denial-of-service vulnerability has been identified in Sinatra versions prior to 4.2.0. The issue arises in the parsing of 'If-Match' and 'If-None-Match' headers when the 'etag' method is used to construct responses. This vulnerability can cause the header parsing to take an excessive amount of time, potentially leading to a denial-of-service condition. Applications that utilize the 'etag' method in response generation are affected, particularly those running on Ruby versions prior to 3.2.
Exploitation of this vulnerability can lead to a denial-of-service condition, causing applications to become unresponsive or slow.
The vulnerability can be reproduced by sending a request with carefully crafted 'If-Match' or 'If-None-Match' headers to a Sinatra application that uses the 'etag' method in its response. This can be done using a tool like curl or Postman, or by writing a custom script that sends the appropriate headers. The application will then take an unexpectedly long time to process the request, demonstrating the denial-of-service condition.
Users can upgrade to Sinatra version 4.2.0 or later to address this vulnerability. Additionally, applications running on Ruby 3.2 or later are not affected.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.