CVE-2018-1000079: Rubygems update Path Traversal Vulnerability
MODERATECVE-2018-1000079 is a MODERATE (CVSS 5.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Rubygems update libraries in the RubyGems ecosystem. The issue involves rubygems path traversal vulnerability. Remediation is available by upgrading affected packages to version 2.7.6, 9.1.16.0.
CVE-2018-1000079 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N).
How to Fix CVE-2018-1000079
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.6
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-stdlib</artifactId>
<version>9.1.16.0</version>
</dependency>
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-2018-1000079, 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.6), 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. 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-2018-1000079 Affected Rubygems update Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rubygems-update
|
RubyGems |
< 2.7.6
|
2.7.6
|
|
org.jruby:jruby-stdlib
|
Maven |
< 9.1.16.0
|
9.1.16.0
|
References
Frequently Asked Questions
What is CVE-2018-1000079?
Which Rubygems update versions are affected?
What version fixes CVE-2018-1000079?
Is rubygems-update affected?
Is jruby-stdlib affected?
What is the CVSS score of CVE-2018-1000079?
What CWE is associated with CVE-2018-1000079?
How can I check RubyGems dependencies for CVE-2018-1000079?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8qxg-mff5-j3wc",
"modified" : "2023-03-10T02:32:15Z",
"published" : "2022-05-14T01:54:40Z",
"aliases" : [ "CVE-2018-1000079" ],
"summary" : "RubyGems Path Traversal vulnerability",
"details" : "RubyGems version Ruby 2.2 series: 2.2.9 and earlier, Ruby 2.3 series: 2.3.6 and earlier, Ruby 2.4 series: 2.4.3 and earlier, Ruby 2.5 series: 2.5.0 and earlier, prior to trunk revision 62422 contains a Directory Traversal vulnerability in gem installation that can result in the gem writing to arbitrary filesystem locations during installation. This attack appears to be exploitable via installation of a malicious gem. This vulnerability is fixed in 2.7.6.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rubygems-update"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.7.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.jruby:jruby-stdlib"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "9.1.16.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1000079"
}, {
"type" : "WEB",
"url" : "https://github.com/rubygems/rubygems/commit/f83f911e19e27cbac1ccce7471d96642241dd759"
}, {
"type" : "WEB",
"url" : "https://github.com/rubygems/rubygems/commit/666ef793cad42eed96f7aee1cdf77865db921099"
}, {
"type" : "WEB",
"url" : "https://github.com/jruby/jruby/commit/0b06b48ab4432237ce5fc1bef47f2c6bcf7843f7"
}, {
"type" : "WEB",
"url" : "https://github.com/rubygems/rubygems/commit/5971b486d4dbb2bad5d3445b3801c456eb0ce183"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2018/dsa-4259"
}, {
"type" : "WEB",
"url" : "https://www.debian.org/security/2018/dsa-4219"
}, {
"type" : "WEB",
"url" : "https://usn.ubuntu.com/3621-1"
}, {
"type" : "WEB",
"url" : "https://security-tracker.debian.org/tracker/CVE-2018-1000079"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html"
}, {
"type" : "WEB",
"url" : "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895778"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2020:0663"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2020:0591"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2020:0542"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2019:2028"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:3731"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:3730"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:3729"
}, {
"type" : "WEB",
"url" : "http://blog.rubygems.org/2018/02/15/2.7.6-released.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00036.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-03-10T02:32:15Z",
"nvd_published_at" : "2018-03-13T15:29:00Z"
}
}