CVE Vulnerabilities

CVE-2018-1000073

Improper Link Resolution Before File Access ('Link Following')

Published: Mar 13, 2018 | Modified: Aug 24, 2020
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CVSS 2.x
5 MEDIUM
AV:N/AC:L/Au:N/C:P/I:N/A:N
RedHat/V2
RedHat/V3
5.5 MODERATE
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Ubuntu
LOW

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 install_location function of package.rb that can result in path traversal when writing to a symlinked basedir outside of the root. This vulnerability appears to have been fixed in 2.7.6.

Weakness

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.

Affected Software

Name Vendor Start Version End Version
Rubygems Rubygems * 2.2.9 (including)
Red Hat Enterprise Linux 7 RedHat ruby-0:2.0.0.648-36.el7 *
Red Hat Enterprise Linux 7.4 Advanced Update Support RedHat ruby-0:2.0.0.648-35.el7_4 *
Red Hat Enterprise Linux 7.4 Telco Extended Update Support RedHat ruby-0:2.0.0.648-35.el7_4 *
Red Hat Enterprise Linux 7.4 Update Services for SAP Solutions RedHat ruby-0:2.0.0.648-35.el7_4 *
Red Hat Enterprise Linux 7.5 Extended Update Support RedHat ruby-0:2.0.0.648-35.el7_5 *
Red Hat Enterprise Linux 7.6 Extended Update Support RedHat ruby-0:2.0.0.648-36.el7_6 *
Red Hat Software Collections for Red Hat Enterprise Linux 6 RedHat rh-ruby23-ruby-0:2.3.8-69.el6 *
Red Hat Software Collections for Red Hat Enterprise Linux 6 RedHat rh-ruby24-ruby-0:2.4.5-91.el6 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-ruby23-ruby-0:2.3.8-69.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-ruby24-ruby-0:2.4.5-91.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-ruby25-ruby-0:2.5.3-6.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS RedHat rh-ruby23-ruby-0:2.3.8-69.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS RedHat rh-ruby24-ruby-0:2.4.5-91.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS RedHat rh-ruby25-ruby-0:2.5.3-6.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS RedHat rh-ruby23-ruby-0:2.3.8-69.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS RedHat rh-ruby24-ruby-0:2.4.5-91.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUS RedHat rh-ruby25-ruby-0:2.5.3-6.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS RedHat rh-ruby23-ruby-0:2.3.8-69.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS RedHat rh-ruby24-ruby-0:2.4.5-91.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.6 EUS RedHat rh-ruby25-ruby-0:2.5.3-6.el7 *
Jruby Ubuntu artful *
Jruby Ubuntu bionic *
Jruby Ubuntu cosmic *
Jruby Ubuntu disco *
Jruby Ubuntu trusty *
Jruby Ubuntu xenial *
Ruby2.0 Ubuntu trusty *
Ruby2.3 Ubuntu artful *
Ruby2.3 Ubuntu xenial *
Ruby2.5 Ubuntu bionic *

Potential Mitigations

  • Follow the principle of least privilege when assigning access rights to entities in a software system.
  • Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.

References