CVE-2018-1000544: Rubyzip Path Traversal Vulnerability
CRITICALCVE-2018-1000544 is a CRITICAL (CVSS 9.8) path traversal vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Rubyzip libraries in the RubyGems ecosystem. The issue involves rubyzip gem contains a directory traversal vulnerability in zip file component. Remediation is available by upgrading affected packages to version 1.2.2.
CVE-2018-1000544 at a Glance
Security Impact
CVSS: 9.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:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2018-1000544
To remediate this vulnerability, upgrade all affected Rubyzip 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 rubyzip to 1.2.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rubyzip
How to Check if You Are Affected
To determine whether your application is affected by CVE-2018-1000544, inspect your project dependencies for Rubyzip:
inspect dependencies for rubyzip
Analyze the terminal output to locate any version of Rubyzip in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.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 CWE-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In Rubyzip, 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-1000544 Affected Rubyzip Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rubyzip
|
RubyGems |
< 1.2.2
|
1.2.2
|
References
Frequently Asked Questions
What is CVE-2018-1000544?
Which Rubyzip versions are affected?
What version fixes CVE-2018-1000544?
Is rubyzip affected?
What is the CVSS score of CVE-2018-1000544?
What CWE is associated with CVE-2018-1000544?
How can I check RubyGems dependencies for CVE-2018-1000544?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vqcq-mrmw-mcmg",
"modified" : "2022-04-26T18:30:20Z",
"published" : "2018-09-06T03:27:18Z",
"aliases" : [ "CVE-2018-1000544" ],
"summary" : "Rubyzip gem contains a Directory Traversal vulnerability in zip file component",
"details" : "rubyzip gem rubyzip version 1.2.1 and earlier contains a Directory Traversal vulnerability in Zip::File component that can result in write arbitrary files to the filesystem. This attack appear to be exploitable via If a site allows uploading of .zip files , an attacker can upload a malicious file that contains symlinks or files with absolute pathnames \"../\" to write arbitrary files to the filesystem..\n\nThis is similar to CVE-2017-5946 which was patched in 1.2.1 but the fix in that case was incomplete.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rubyzip"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.2.1"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1000544"
}, {
"type" : "WEB",
"url" : "https://github.com/rubyzip/rubyzip/issues/369"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2018:3466"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rubyzip/CVE-2018-1000544.yml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rubyzip/rubyzip"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2018/08/msg00013.html"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2020/08/msg00002.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-434", "CWE-59" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:58:07Z",
"nvd_published_at" : null
}
}