Filter by signal
6 sinatra CVEs, newest first
Sinatra is vulnerable to ReDoS through ETag header value generation ### 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 * https://github.com/sinatra/sinatra/issues/2120 (report) * https://github.com/sinatra/sinatra/pull/2121 (fix) * https://github.com/sinatra/sinatra/pull/1823 (older ReDoS vulnerability) * https://bugs.ruby-lang.org/issues/19104 (fix in Ruby >= 3.2)
Affected: from the first version, < 4.2.0
Sinatra vulnerable to Reliance on Untrusted Inputs in a Security Decision Versions of the package sinatra from 0.0.0 are vulnerable to Reliance on Untrusted Inputs in a Security Decision via the X-Forwarded-Host (XFH) header. When making a request to a method with redirect applied, it is possible to trigger an Open Redirect Attack by inserting an arbitrary address into this header. If used for caching purposes, such as with servers like Nginx, or as a reverse proxy, without handling the X-Forwarded-Host header, attackers can potentially exploit Cache Poisoning or Routing-based SSRF.
Affected: from the first version, < 4.1.0
Sinatra vulnerable to Reflected File Download attack ### Description An issue was discovered in Sinatra 2.0 before 2.2.3 and 3.0 before 3.0.4. An application is vulnerable to a reflected file download (RFD) attack that sets the Content-Disposition header of a response when the filename is derived from user-supplied input. ### References * https://www.blackhat.com/docs/eu-14/materials/eu-14-Hafif-Reflected-File-Download-A-New-Web-Attack-Vector.pdf * https://github.com/advisories/GHSA-8x94-hmjh-97hq
Affected: ≥ 2.0.0, < 2.2.3 · ≥ 3.0, < 3.0.4
sinatra does not validate expanded path matches Sinatra before 2.2.0 does not validate that the expanded path matches public_dir when serving static files.
Affected: from the first version, < 2.2.0
Sinatra Cross-site Scripting vulnerability Sinatra before 2.0.2 has XSS via the 400 Bad Request page that occurs upon a params parser exception.
Affected: ≥ 2.0.0, < 2.0.2
Sinatra Path Traversal vulnerability An issue was discovered in `rack-protection/lib/rack/protection/path_traversal.rb` in Sinatra 2.x before 2.0.1 on Windows. Path traversal is possible via backslash characters.
Affected: ≥ 2.0.0.beta1, < 2.0.1
