All reports
Low

ruby: Unintentional file and directory creation with directory traversal in tempfile and tmpdir

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2018-6914

Probability of exploitation in the next 30 days: 10.16%

FIRST EPSS · 2026-11-23

Description

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.