CVE Vulnerabilities

CVE-2011-1004

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

Published: Mar 02, 2011 | Modified: May 12, 2012
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
RedHat/V3
Ubuntu

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

Name Vendor Start Version End Version
Ruby Ruby-lang 1.8.6 (including) 1.8.6 (including)
Ruby Ruby-lang 1.8.7 (including) 1.8.7 (including)
Ruby Ruby-lang 1.8.8-dev (including) 1.8.8-dev (including)
Ruby Ruby-lang 1.9.1 (including) 1.9.1 (including)
Ruby Ruby-lang 1.9.2 (including) 1.9.2 (including)
Ruby Ruby-lang 1.9.3-dev (including) 1.9.3-dev (including)

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