CVE-2018-6914
published 2018-04-03CVE-2018-6914: Directory traversal vulnerability in the Dir.mktmpdir method in the tmpdir library in Ruby before 2.2.10, 2.3.x before 2.3.7, 2.4.x before 2.4.4, 2.5.x before…
PriorityP350high7.5CVSS 3.0
AVNACLPRNUINSUCNIHAN
EPSS
10.55%
95.2th percentile
Directory traversal vulnerability in the Dir.mktmpdir method in the tmpdir library in Ruby before 2.2.10, 2.3.x before 2.3.7, 2.4.x before 2.4.4, 2.5.x before 2.5.1, and 2.6.0-preview1 might allow attackers to create arbitrary directories or files via a .. (dot dot) in the prefix argument.
Affected
38 ranges· showing 25
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| apple | macos_high_sierra_10.13.6_security_update_2018-004_sierra_security_update_2018-0 | — | — |
| apple | macos_mojave_10.14.1_security_update_2018-002_high_sierra_security_update_2018-0 | — | — |
| canonical | ubuntu_linux | — | — |
| canonical | ubuntu_linux | — | — |
| canonical | ubuntu_linux | — | — |
| debian | debian_linux | — | — |
| debian | debian_linux | — | — |
| debian | debian_linux | — | — |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux | — | — |
| redhat | enterprise_linux | — | — |
| ruby-lang | ruby | — | — |
| ruby-lang | ruby | >= 0 < 2.5.1-r0 | 2.5.1-r0 |
| ruby-lang | ruby | >= 0 < 2.5.1-r0 | 2.5.1-r0 |
| ruby-lang | ruby | >= 0 < 2.5.1-r0 | 2.5.1-r0 |
| ruby-lang | ruby | >= 0 < 2.5.1-r0 | 2.5.1-r0 |
| ruby-lang | ruby | >= 0 < 2.5.1-r0 | 2.5.1-r0 |
| ruby-lang | ruby | >= 0 < 2.5.1-r0 | 2.5.1-r0 |
| ruby-lang | ruby | >= 0 < 2.5.1-r0 | 2.5.1-r0 |
| ruby-lang | ruby | >= 0 < 2.5.1-r0 | 2.5.1-r0 |
| ruby-lang | ruby | >= 0 < 2.5.1-r0 | 2.5.1-r0 |
| ruby-lang | ruby | >= 0 < 2.5.1-r0 | 2.5.1-r0 |
| ruby-lang | ruby | >= 0 < 2.5.1-r0 | 2.5.1-r0 |
CVSS provenance
nvdv3.07.5HIGHCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:N/I:P/A:N
osv7.5HIGH
vendor_redhat7.5HIGH
vendor_ubuntu7.5HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
VulDB
Ruby up to 2.2.9/2.3.6/2.4.3/2.5.0 Dirmktmpdir prefix path traversal (RHSA-2018:3729 / Nessus ID 109284)
vuldb·2026-05-10·CVSS 7.5
CVE-2018-6914 [HIGH] Ruby up to 2.2.9/2.3.6/2.4.3/2.5.0 Dirmktmpdir prefix path traversal (RHSA-2018:3729 / Nessus ID 109284)
A vulnerability categorized as critical has been discovered in Ruby up to 2.2.9/2.3.6/2.4.3/2.5.0. This affects the function Dirmktmpdir. The manipulation of the argument prefix with the input .. results in path traversal.
This vulnerability is reported as CVE-2018-6914. The attack can be launched remotely. No exploit exists.
It is advisable to upgrade the affected component.
VulDB
Apple macOS up to 10.14.0 Ruby path traversal (HT209193 / Nessus ID 111081)
vuldb·2026-05-10·CVSS 7.5
CVE-2018-6914 [HIGH] Apple macOS up to 10.14.0 Ruby path traversal (HT209193 / Nessus ID 111081)
A vulnerability identified as critical has been detected in Apple macOS up to 10.14.0. The impacted element is an unknown function of the component Ruby. This manipulation causes path traversal.
This vulnerability is handled as CVE-2018-6914. The attack can be initiated remotely. There is not any exploit available.
You should upgrade the affected component.
GHSA
GHSA-wpg3-wgm5-rv8w: Directory traversal vulnerability in the Dir
ghsa_unreviewed·2022-05-14
CVE-2018-6914 [HIGH] CWE-22 GHSA-wpg3-wgm5-rv8w: Directory traversal vulnerability in the Dir
Directory traversal vulnerability in the Dir.mktmpdir method in the tmpdir library in Ruby before 2.2.10, 2.3.x before 2.3.7, 2.4.x before 2.4.4, 2.5.x before 2.5.1, and 2.6.0-preview1 might allow attackers to create arbitrary directories or files via a .. (dot dot) in the prefix argument.
OSV
ruby1.9.1, ruby2.0, ruby2.3 vulnerabilities
osv·2018-04-16·CVSS 7.5
CVE-2018-6914 [HIGH] ruby1.9.1, ruby2.0, ruby2.3 vulnerabilities
ruby1.9.1, ruby2.0, ruby2.3 vulnerabilities
It was discovered that Ruby incorrectly handled certain inputs. An attacker
could possibly use this to execute arbitrary code. (CVE-2018-6914)
It was discovered that Ruby incorrectly handled certain inputs. An attacker
could possibly use this to access sensitive information. (CVE-2018-8778,
CVE-2018-8780)
It was discovered that Ruby incorrectly handled certain inputs. An attacker
could possibly use this to connect to an unintended socket. (CVE-2018-8779)
OSV
CVE-2018-6914: Directory traversal vulnerability in the Dir
osv·2018-04-03·CVSS 7.5
CVE-2018-6914 [HIGH] CVE-2018-6914: Directory traversal vulnerability in the Dir
Directory traversal vulnerability in the Dir.mktmpdir method in the tmpdir library in Ruby before 2.2.10, 2.3.x before 2.3.7, 2.4.x before 2.4.4, 2.5.x before 2.5.1, and 2.6.0-preview1 might allow attackers to create arbitrary directories or files via a .. (dot dot) in the prefix argument.
Apple
CVE-2018-6914: macOS Mojave 10.14.1, Security Update 2018-002 High Sierra, Security Update 2018-005 Sierra
vendor_apple·2018-10-30·CVSS 7.5
CVE-2018-6914 [HIGH] CVE-2018-6914: macOS Mojave 10.14.1, Security Update 2018-002 High Sierra, Security Update 2018-005 Sierra
Apple Security Update: About the security content of macOS Mojave 10.14.1, Security Update 2018-002 High Sierra, Security Update 2018-005 Sierra
Product: macOS Mojave 10.14.1, Security Update 2018-002 High Sierra, Security Update 2018-005 Sierra
CVE: CVE-2018-6914
Component: CVE-2018-6914
Apple
CVE-2018-6914: macOS High Sierra 10.13.6, Security Update 2018-004 Sierra, Security Update 2018-004 El Capitan
vendor_apple·2018-07-09·CVSS 7.5
CVE-2018-6914 [HIGH] CVE-2018-6914: macOS High Sierra 10.13.6, Security Update 2018-004 Sierra, Security Update 2018-004 El Capitan
Apple Security Update: About the security content of macOS High Sierra 10.13.6, Security Update 2018-004 Sierra, Security Update 2018-004 El Capitan
Product: macOS High Sierra 10.13.6, Security Update 2018-004 Sierra, Security Update 2018-004 El Capitan
CVE: CVE-2018-6914
Component: CVE-2018-6914
Ubuntu
Ruby vulnerabilities
vendor_ubuntu·2018-04-16·CVSS 7.5
CVE-2018-6914 [HIGH] Ruby vulnerabilities
Title: Ruby vulnerabilities
Summary: Several security issues were fixed in Ruby.
It was discovered that Ruby incorrectly handled certain inputs. An attacker
could possibly use this to execute arbitrary code. (CVE-2018-6914)
It was discovered that Ruby incorrectly handled certain inputs. An attacker
could possibly use this to access sensitive information. (CVE-2018-8778,
CVE-2018-8780)
It was discovered that Ruby incorrectly handled certain inputs. An attacker
could possibly use this to connect to an unintended socket. (CVE-2018-8779)
Instructions: In general, a standard system update will make all the necessary changes.
Red Hat
ruby: Unintentional file and directory creation with directory traversal in tempfile and tmpdir
vendor_redhat·2018-03-28·CVSS 7.5
CVE-2018-6914 [HIGH] CWE-22 ruby: Unintentional file and directory creation with directory traversal in tempfile and tmpdir
ruby: Unintentional file and directory creation with directory traversal in tempfile and tmpdir
Directory traversal vulnerability in the Dir.mktmpdir method in the tmpdir library in Ruby before 2.2.10, 2.3.x before 2.3.7, 2.4.x before 2.4.4, 2.5.x before 2.5.1, and 2.6.0-preview1 might allow attackers to create arbitrary directories or files via a .. (dot dot) in the prefix argument.
It was found that the tmpdir and tempfile modules did not sanitize their file name argument. An attacker with control over the name could create temporary files and directories outside of the dedicated directory.
Statement: This issue affects the versions of ruby as shipped with Red Hat CloudForms 4. Red Hat Product Security has rated this issue as having security impact of Moderate. A future update may add
No detection rules found.
No public exploits indexed.
Bugzilla
CVE-2018-6914 ruby: Unintentional file and directory creation with directory traversal in tempfile and tmpdir
bugzilla·2018-03-29·CVSS 7.5
CVE-2018-6914 [HIGH] CVE-2018-6914 ruby: Unintentional file and directory creation with directory traversal in tempfile and tmpdir
CVE-2018-6914 ruby: Unintentional file and directory creation with directory traversal in tempfile and tmpdir
Dir.mktmpdir method introduced by tmpdir library accepts the prefix and the suffix of the directory which is created as the first parameter. The prefix can contain relative directory specifiers "../", so this method can be used to target any directory. So, if a script accepts an external input as the prefix, and the targeted directory has inappropriate permissions or the ruby process has inappropriate privileges, the attacker can create a directory or a file at any directory.
Affected versions:
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
External References:
https://www.ruby-lang.or
Bugzilla
CVE-2017-17742 CVE-2018-6914 CVE-2018-8777 CVE-2018-8778 CVE-2018-8779 CVE-2018-8780 ruby: various flaws [fedora-all]
bugzilla·2018-03-29·CVSS 5.3
CVE-2017-17742 [MEDIUM] CVE-2017-17742 CVE-2018-6914 CVE-2018-8777 CVE-2018-8778 CVE-2018-8779 CVE-2018-8780 ruby: various flaws [fedora-all]
CVE-2017-17742 CVE-2018-6914 CVE-2018-8777 CVE-2018-8778 CVE-2018-8779 CVE-2018-8780 ruby: various flaws [fedora-all]
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of fedora-all.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When submitting as an update, use the fedpkg template provided in the next
comment(s). This will include the bug IDs of this tracking bug as well as
the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
fedpkg commit message.
NOTE: this i
http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00036.htmlhttp://www.securityfocus.com/bid/103686http://www.securitytracker.com/id/1042004https://access.redhat.com/errata/RHSA-2018:3729https://access.redhat.com/errata/RHSA-2018:3730https://access.redhat.com/errata/RHSA-2018:3731https://access.redhat.com/errata/RHSA-2019:2028https://lists.debian.org/debian-lts-announce/2018/04/msg00023.htmlhttps://lists.debian.org/debian-lts-announce/2018/04/msg00024.htmlhttps://lists.debian.org/debian-lts-announce/2018/07/msg00012.htmlhttps://usn.ubuntu.com/3626-1/https://www.debian.org/security/2018/dsa-4259https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-2-10-released/https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-3-7-released/https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-4-4-released/https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-5-1-released/https://www.ruby-lang.org/en/news/2018/03/28/unintentional-file-and-directory-creation-with-directory-traversal-cve-2018-6914/http://lists.opensuse.org/opensuse-security-announce/2019-07/msg00036.htmlhttp://www.securityfocus.com/bid/103686http://www.securitytracker.com/id/1042004https://access.redhat.com/errata/RHSA-2018:3729https://access.redhat.com/errata/RHSA-2018:3730https://access.redhat.com/errata/RHSA-2018:3731https://access.redhat.com/errata/RHSA-2019:2028https://lists.debian.org/debian-lts-announce/2018/04/msg00023.htmlhttps://lists.debian.org/debian-lts-announce/2018/04/msg00024.htmlhttps://lists.debian.org/debian-lts-announce/2018/07/msg00012.htmlhttps://usn.ubuntu.com/3626-1/https://www.debian.org/security/2018/dsa-4259https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-2-10-released/https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-3-7-released/https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-4-4-released/https://www.ruby-lang.org/en/news/2018/03/28/ruby-2-5-1-released/https://www.ruby-lang.org/en/news/2018/03/28/unintentional-file-and-directory-creation-with-directory-traversal-cve-2018-6914/
2018-04-03
Published