CVE-2024-21510: Sinatra Sinatra Vulnerable To Reliance On Vulnerability
MODERATECVE-2024-21510 is a MODERATE (CVSS 5.4) sinatra vulnerable to reliance on vulnerability (CWE-807: Reliance on Untrusted Inputs in a Security Decision) affecting Sinatra libraries in the RubyGems ecosystem. The issue involves sinatra vulnerable to reliance on untrusted inputs in a security decision. Remediation is available by upgrading affected packages to version 4.1.0.
CVE-2024-21510 at a Glance
Security Impact
CVSS: 5.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N).
How to Fix CVE-2024-21510
To remediate this vulnerability, upgrade all affected Sinatra dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade sinatra to 4.1.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for sinatra
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-21510, inspect your project dependencies for Sinatra:
inspect dependencies for sinatra
Analyze the terminal output to locate any version of Sinatra in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.1.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-807: Reliance on Untrusted Inputs in a Security Decision, where the product uses a protection mechanism that relies on the existence or values of an input, but the input can be modified by an untrusted actor in a way that bypasses the protection mechanism. In Sinatra, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-21510 Affected Sinatra Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
sinatra
|
RubyGems |
< 4.1.0
|
4.1.0
|
References
Frequently Asked Questions
What is CVE-2024-21510?
Which Sinatra versions are affected?
What version fixes CVE-2024-21510?
Is sinatra affected?
What is the CVSS score of CVE-2024-21510?
What CWE is associated with CVE-2024-21510?
How can I check RubyGems dependencies for CVE-2024-21510?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hxx2-7vcw-mqr3",
"modified" : "2024-11-20T16:38:35Z",
"published" : "2024-11-01T06:30:34Z",
"aliases" : [ "CVE-2024-21510" ],
"summary" : "Sinatra vulnerable to Reliance on Untrusted Inputs in a Security Decision",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "sinatra"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.1.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-21510"
}, {
"type" : "WEB",
"url" : "https://github.com/sinatra/sinatra/pull/2010"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-hxx2-7vcw-mqr3"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sinatra/CVE-2024-21510.yml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sinatra/sinatra"
}, {
"type" : "WEB",
"url" : "https://github.com/sinatra/sinatra/blob/b626e2d82c23b4fde0b51782fd32ca27ccde1d1a/lib/sinatra/base.rb#L319"
}, {
"type" : "WEB",
"url" : "https://github.com/sinatra/sinatra/blob/b626e2d82c23b4fde0b51782fd32ca27ccde1d1a/lib/sinatra/base.rb#L323C1-L343C17"
}, {
"type" : "WEB",
"url" : "https://github.com/sinatra/sinatra/blob/main/CHANGELOG.md#410--2024-11-18"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-RUBY-SINATRA-6483832"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-807" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-11-01T21:37:42Z",
"nvd_published_at" : "2024-11-01T05:15:05Z"
}
}