CVE-2014-1624: Pyxdg Pyxdg Arbitrary File Overwrite Vulnerability

LOW
Advisory Identifier: GHSA-7372-q459-jxhr
CWE-59
Published
Advisory Summary

CVE-2014-1624 is a LOW pyxdg arbitrary file overwrite vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Pyxdg libraries in the PyPI ecosystem. The issue involves pyxdg arbitrary file overwrite via race condition. Remediation is available by upgrading affected packages to version 0.26.

CVE-2014-1624 at a Glance

CVE Identifier CVE-2014-1624
GHSA Identifier GHSA-7372-q459-jxhr
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product Pyxdg
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2014-1624

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

pyxdg fixed: 0.26
pip install pyxdg>=0.26
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 pyxdg

How to Check if You Are Affected

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

pip show pyxdg

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

Note: The pip show pyxdg 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 Pyxdg, 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

Race condition in the `xdg.BaseDirectory.get_runtime_dir` function in pyxdg 0.25 allows local users to overwrite arbitrary files by pre-creating `/tmp/pyxdg-runtime-dir-fallback-victim` to point to a victim-owned location, then replacing it with a symlink to an attacker-controlled location once the `get_runtime_dir` function is called.

CVE-2014-1624 Affected Pyxdg Versions

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

References

Frequently Asked Questions

What is CVE-2014-1624?
CVE-2014-1624 is a security vulnerability in Pyxdg involving pyxdg Arbitrary File Overwrite via Race Condition under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which Pyxdg versions are affected?
Affected versions include releases prior to 0.26 across affected packages: pyxdg.
What version fixes CVE-2014-1624?
Upgrading to 0.26 (or the latest patched release for your respective branch) resolves the vulnerability.
Is pyxdg affected?
Yes, pyxdg is affected in releases prior to 0.26. Upgrade your dependency to 0.26 or later.
What CWE is associated with CVE-2014-1624?
CVE-2014-1624 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-2014-1624?
Run the dependency tree command: 'pip show pyxdg'. 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-7372-q459-jxhr",
  "modified" : "2024-10-16T20:40:52Z",
  "published" : "2022-05-17T01:27:07Z",
  "aliases" : [ "CVE-2014-1624" ],
  "summary" : "pyxdg Arbitrary File Overwrite via Race Condition",
  "details" : "Race condition in the `xdg.BaseDirectory.get_runtime_dir` function in pyxdg 0.25 allows local users to overwrite arbitrary files by pre-creating `/tmp/pyxdg-runtime-dir-fallback-victim` to point to a victim-owned location, then replacing it with a symlink to an attacker-controlled location once the `get_runtime_dir` function is called.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "pyxdg"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.26"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 0.25"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2014-1624"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/takluyver/pyxdg/commit/bd999c1c3fe7ee5f30ede2cf704cf03e400347b4"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/90618"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pyxdg/PYSEC-2014-95.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/takluyver/pyxdg"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200227194825/http://www.securityfocus.com/bid/65042"
  }, {
    "type" : "WEB",
    "url" : "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=736247"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2014/01/21/3"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2014/01/21/4"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-16T22:48:18Z",
    "nvd_published_at" : "2014-01-28T00:55:00Z"
  }
}