CVE Vulnerabilities

CVE-2011-1004

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

Published: Mar 02, 2011 | Modified: Apr 11, 2025
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
6.3 MEDIUM
AV:L/AC:M/Au:N/C:N/I:C/A:C
RedHat/V2
3.6 MODERATE
AV:L/AC:L/Au:N/C:N/I:P/A:P
RedHat/V3
Ubuntu
LOW
root.io logo minimus.io logo echo.ai logo

The FileUtils.remove_entry_secure method in Ruby 1.8.6 through 1.8.6-420, 1.8.7 through 1.8.7-330, 1.8.8dev, 1.9.1 through 1.9.1-430, 1.9.2 through 1.9.2-136, and 1.9.3dev allows local users to delete arbitrary files via a symlink attack.

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

NameVendorStart VersionEnd Version
RubyRuby-lang1.8.6 (including)1.8.6 (including)
RubyRuby-lang1.8.7 (including)1.8.7 (including)
RubyRuby-lang1.8.8-dev (including)1.8.8-dev (including)
RubyRuby-lang1.9.1 (including)1.9.1 (including)
RubyRuby-lang1.9.2 (including)1.9.2 (including)
RubyRuby-lang1.9.3-dev (including)1.9.3-dev (including)
Red Hat Enterprise Linux 5RedHatruby-0:1.8.5-19.el5_6.1*
Red Hat Enterprise Linux 6RedHatruby-0:1.8.7.299-7.el6_1.1*
Ruby1.8Ubuntudapper*
Ruby1.8Ubuntuhardy*
Ruby1.8Ubuntukarmic*
Ruby1.8Ubuntulucid*
Ruby1.8Ubuntumaverick*
Ruby1.8Ubuntunatty*
Ruby1.8Ubuntuupstream*
Ruby1.9Ubuntudapper*
Ruby1.9Ubuntuhardy*
Ruby1.9Ubuntukarmic*
Ruby1.9Ubuntulucid*
Ruby1.9.1Ubuntukarmic*
Ruby1.9.1Ubuntulucid*
Ruby1.9.1Ubuntumaverick*
Ruby1.9.1Ubuntunatty*
Ruby1.9.1Ubuntuupstream*

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