CVE-2019-8324: Rubygems update Code Injection Vulnerability
HIGHCVE-2019-8324 is a HIGH (CVSS 8.8) code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Rubygems update libraries in the RubyGems ecosystem. The issue involves code injection in rubygems. Remediation is available by upgrading affected packages to version 2.7.9, 3.0.2.
CVE-2019-8324 at a Glance
Security Impact
CVSS: 8.8
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:H/I:H/A:H).
How to Fix CVE-2019-8324
To remediate this vulnerability, upgrade all affected Rubygems update 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 rubygems-update to 2.7.9
Upgrade rubygems-update to 3.0.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rubygems-update
How to Check if You Are Affected
To determine whether your application is affected by CVE-2019-8324, inspect your project dependencies for Rubygems update:
inspect dependencies for rubygems-update
Analyze the terminal output to locate any version of Rubygems update in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.7.9), 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Rubygems update, 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-2019-8324 Affected Rubygems update Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rubygems-update
|
RubyGems |
≥ 2.6.0
< 2.7.9
|
2.7.9
|
|
rubygems-update
|
RubyGems |
≥ 3.0.0
< 3.0.2
|
3.0.2
|
References
Frequently Asked Questions
What is CVE-2019-8324?
Which Rubygems update versions are affected?
What version fixes CVE-2019-8324?
Is rubygems-update affected?
What is the CVSS score of CVE-2019-8324?
What CWE is associated with CVE-2019-8324?
How can I check RubyGems dependencies for CVE-2019-8324?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-76wm-422q-92mq",
"modified" : "2021-08-17T13:42:04Z",
"published" : "2019-06-20T16:06:11Z",
"aliases" : [ "CVE-2019-8324" ],
"summary" : "Code injection in RubyGems",
"details" : "An issue was discovered in RubyGems 2.6 and later through 3.0.2. A crafted gem with a multi-line name is not handled correctly. Therefore, an attacker could inject arbitrary code to the stub line of gemspec, which is eval-ed by code in ensure_loadable_spec during the preinstall check.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rubygems-update"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.6.0"
}, {
"fixed" : "2.7.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rubygems-update"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.0.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-8324"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2019:1972"
}, {
"type" : "WEB",
"url" : "https://blog.rubygems.org/2019/03/05/security-advisories-2019-03.html"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubygems-update/CVE-2019-8324.yml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2020/08/msg00027.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00036.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2019-06-20T16:01:22Z",
"nvd_published_at" : null
}
}