CVE-2011-4617: Virtualenv Virtualenv Allows Symlink Attack On Vulnerability

MODERATE
Advisory Identifier: GHSA-3jhc-wjqf-5f2c
CVSS 6.2
CWE-59
Published
Advisory Summary

CVE-2011-4617 is a MODERATE (CVSS 6.2) virtualenv allows symlink attack on vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Virtualenv libraries in the PyPI ecosystem. The issue involves virtualenv allows symlink attack on /tmp/. Remediation is available by upgrading affected packages to version 1.5.

CVE-2011-4617 at a Glance

CVE Identifier CVE-2011-4617
GHSA Identifier GHSA-3jhc-wjqf-5f2c
Severity MODERATE
CVSS v3.1 Base Score 6.2
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product Virtualenv
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2011-4617

To remediate this vulnerability, upgrade all affected Virtualenv dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

virtualenv fixed: 1.5
pip install virtualenv>=1.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show virtualenv

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2011-4617, inspect your installed packages using pip:

pip show virtualenv

Analyze the terminal output to locate any version of Virtualenv in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5), your application is affected.

Note: The pip show virtualenv command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following'), where 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. In Virtualenv, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

virtualenv.py in virtualenv before 1.5 allows local users to overwrite arbitrary files via a symlink attack on a certain file in /tmp/.

CVE-2011-4617 Affected Virtualenv Versions

1 component(s)
Fixed Versions:
1.5
Product / Package Ecosystem Affected Versions Fixed Version
virtualenv
PyPI
< 1.5
1.5

References

Frequently Asked Questions

What is CVE-2011-4617?
CVE-2011-4617 is a security vulnerability in Virtualenv involving Virtualenv Allows Symlink Attack on /tmp/ under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which Virtualenv versions are affected?
Affected versions include releases prior to 1.5 across affected packages: virtualenv.
What version fixes CVE-2011-4617?
Upgrading to 1.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is virtualenv affected?
Yes, virtualenv is affected in releases prior to 1.5. Upgrade your dependency to 1.5 or later.
What is the CVSS score of CVE-2011-4617?
CVE-2011-4617 has a CVSS v3.1 base score of 6.2 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2011-4617?
CVE-2011-4617 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (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.).
How can I check PyPI dependencies for CVE-2011-4617?
Run the dependency tree command: 'pip show virtualenv'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3jhc-wjqf-5f2c",
  "modified" : "2024-11-18T23:01:50Z",
  "published" : "2022-05-17T05:35:07Z",
  "aliases" : [ "CVE-2011-4617" ],
  "summary" : "Virtualenv Allows Symlink Attack on /tmp/",
  "details" : "virtualenv.py in virtualenv before 1.5 allows local users to overwrite arbitrary files via a symlink attack on a certain file in /tmp/.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "virtualenv"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2011-4617"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/virtualenv/commit/68075ad9ededf7df2c46d385f836c13b729de2ca"
  }, {
    "type" : "WEB",
    "url" : "https://bitbucket.org/ianb/virtualenv/changeset/8be37c509fe5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/virtualenv/PYSEC-2011-23.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/pypa/virtualenv"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200228151935/https://bitbucket.org/ianb/virtualenv/commits/8be37c509fe5"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2012-January/071638.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2012-January/071643.html"
  }, {
    "type" : "WEB",
    "url" : "http://openwall.com/lists/oss-security/2011/12/19/2"
  }, {
    "type" : "WEB",
    "url" : "http://openwall.com/lists/oss-security/2011/12/19/4"
  }, {
    "type" : "WEB",
    "url" : "http://openwall.com/lists/oss-security/2011/12/19/5"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-19T17:40:42Z",
    "nvd_published_at" : "2011-12-31T01:55:00Z"
  }
}