Skip to content

← Public intelligence

RubyGems package

sinatra

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

6 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Low, CVSS 2.7RubyGemsPublished

    Sinatra is vulnerable to ReDoS through ETag header value generation

    CVE-2025-61921 · GHSA-mr3q-g2mv-mr4q

    Affected
    • RubyGems sinatra < 4.2.0
    Fixed in
    4.2.0· Vendor fix available
    Issue
    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)

    Recommended action: Upgrade to 4.2.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. Medium, CVSS 5.3RubyGemsPublished

    Sinatra vulnerable to Reliance on Untrusted Inputs in a Security Decision

    CVE-2024-21510 · GHSA-hxx2-7vcw-mqr3

    Affected
    • RubyGems sinatra < 4.1.0
    Fixed in
    4.1.0· Vendor fix available
    Issue
    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.

    Recommended action: Upgrade to 4.1.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  3. High, CVSS 8.8RubyGemsPublished

    Sinatra vulnerable to Reflected File Download attack

    CVE-2022-45442 · GHSA-2x8x-jmrp-phxw

    Affected
    • RubyGems sinatra >= 3.0, < 3.0.4; >= 2.0.0, < 2.2.3
    Fixed in
    3.0.42.2.3· Vendor fix available
    Issue
    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

    Recommended action: Upgrade to 3.0.4 or 2.2.3 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  4. High, CVSS 7.5RubyGemsPublished

    sinatra does not validate expanded path matches

    CVE-2022-29970 · GHSA-qp49-3pvw-x4m5

    Affected
    • RubyGems sinatra < 2.2.0
    Fixed in
    2.2.0· Vendor fix available
    Issue
    Sinatra before 2.2.0 does not validate that the expanded path matches publicdir when serving static files.

    Recommended action: Upgrade to 2.2.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  5. Medium, CVSS 6.1RubyGemsPublished

    Sinatra Cross-site Scripting vulnerability

    CVE-2018-11627 · GHSA-mq35-wqvf-r23c

    Affected
    • RubyGems sinatra >= 2.0.0, < 2.0.2
    Fixed in
    2.0.2· Vendor fix available
    Issue
    Sinatra before 2.0.2 has XSS via the 400 Bad Request page that occurs upon a params parser exception.

    Recommended action: Upgrade to 2.0.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  6. Medium, CVSS 5.3RubyGemsPublished

    Sinatra Path Traversal vulnerability

    CVE-2018-7212 · GHSA-h29f-7f56-j8wh

    Affected
    • RubyGems sinatra >= 2.0.0.beta1, < 2.0.1
    Fixed in
    2.0.1· Vendor fix available
    Issue
    An issue was discovered in rack-protection/lib/rack/protection/pathtraversal.rb in Sinatra 2.x before 2.0.1 on Windows. Path traversal is possible via backslash characters.

    Recommended action: Upgrade to 2.0.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →