CVE-2024-27456: Rack cors Rack CORS Middleware Has Insecure Vulnerability
MODERATECVE-2024-27456 is a MODERATE rack cors middleware has insecure vulnerability (General Security Weakness) affecting Rack cors libraries in the RubyGems ecosystem. The issue involves rack cors middleware has insecure file permissions. Remediation is available by upgrading affected packages to version 2.0.2.
CVE-2024-27456 at a Glance
How to Fix CVE-2024-27456
To remediate this vulnerability, upgrade all affected Rack cors 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 rack-cors to 2.0.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rack-cors
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-27456, inspect your project dependencies for Rack cors:
inspect dependencies for rack-cors
Analyze the terminal output to locate any version of Rack cors in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.2), 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 General Security Weakness. In Rack cors, 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-27456 Affected Rack cors Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rack-cors
|
RubyGems |
≥ 2.0.1
< 2.0.2
All 1 versions
2.0.1
|
2.0.2
|
References
Frequently Asked Questions
What is CVE-2024-27456?
Which Rack cors versions are affected?
What version fixes CVE-2024-27456?
Is rack-cors affected?
What CWE is associated with CVE-2024-27456?
How can I check RubyGems dependencies for CVE-2024-27456?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-785g-282q-pwvx",
"modified" : "2024-03-04T18:51:48Z",
"published" : "2024-02-26T18:30:31Z",
"aliases" : [ "CVE-2024-27456" ],
"summary" : "Rack CORS Middleware has Insecure File Permissions",
"details" : "rack-cors (aka Rack CORS Middleware) 2.0.1 has 0666 permissions for the .rb files.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rack-cors"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.1"
}, {
"fixed" : "2.0.2"
} ]
} ],
"versions" : [ "2.0.1" ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27456"
}, {
"type" : "WEB",
"url" : "https://github.com/cyu/rack-cors/issues/274"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-785g-282q-pwvx"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cyu/rack-cors"
}, {
"type" : "WEB",
"url" : "https://github.com/cyu/rack-cors/blob/878063987bd1ca956282dda95697fd821bf24d2e/CHANGELOG.md#changed"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack-cors/CVE-2024-27456.yml"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-26T22:15:06Z",
"nvd_published_at" : "2024-02-26T16:28:00Z"
}
}