Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1561947 - (CVE-2018-6914) 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 ...
Status: NEW
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20180328,reported=2...
: Security
Depends On: 1568980 1568981 1568982 1568983 1561956 1561957 1561958 1563873 1563874 1565258 1568984
Blocks: 1561954
  Show dependency treegraph
 
Reported: 2018-03-29 05:07 EDT by Adam Mariš
Modified: 2018-07-17 08:35 EDT (History)
29 users (show)

See Also:
Fixed In Version: ruby 2.2.10, ruby 2.3.7, ruby 2.4.4, ruby 2.5.1
Doc Type: If docs needed, set a value
Doc Text:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2018-03-29 05:07:06 EDT
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.org/en/news/2018/03/28/unintentional-file-and-directory-creation-with-directory-traversal-cve-2018-6914/
Comment 1 Adam Mariš 2018-03-29 05:16:08 EDT
Created ruby tracking bugs for this issue:

Affects: fedora-all [bug 1561957]
Comment 8 Cedric Buissart 2018-04-18 10:24:45 EDT
Low impact because of the filename requirements : path will still contain unpredictable characters. Thus the attacker does not have full control over the filename, or the directory.
Comment 9 Andrej Nemec 2018-05-14 11:26:40 EDT
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 address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

This issue affects the versions of ruby as shipped with Red Hat Subscription Asset Manager 1. Red Hat Product Security has rated this issue as having security impact of Moderate. A future update may address this issue. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Note You need to log in before you can comment on or make changes to this bug.