CVE-2014-1858: Numpy Arbitrary File Write Vulnerability

HIGH
Advisory Identifier: GHSA-cw6w-4rcx-xphc
CVSS 5.5
CWE-20
Published
Advisory Summary

CVE-2014-1858 is a HIGH (CVSS 5.5) arbitrary file write vulnerability (CWE-20: Improper Input Validation) affecting Numpy libraries in the PyPI ecosystem. The issue involves arbitrary file write in numpy. Remediation is available by upgrading affected packages to version 1.8.1.

CVE-2014-1858 at a Glance

CVE Identifier CVE-2014-1858
GHSA Identifier GHSA-cw6w-4rcx-xphc
Severity HIGH
CVSS v3.1 Base Score 5.5
CWE Classification CWE-20: Improper Input Validation
Affected Product Numpy
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.5

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

Attack Vector Local (AV:L)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
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-2014-1858

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

numpy fixed: 1.8.1
pip install numpy>=1.8.1
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 numpy

How to Check if You Are Affected

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

pip show numpy

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Numpy, 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

__init__.py in f2py in NumPy before 1.8.1 allows local users to write to arbitrary files via a symlink attack on a temporary file.

CVE-2014-1858 Affected Numpy Versions

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

References

Frequently Asked Questions

What is CVE-2014-1858?
CVE-2014-1858 is a security vulnerability in Numpy involving Arbitrary file write in NumPy under CWE-20: Improper Input Validation.
Which Numpy versions are affected?
Affected versions include releases prior to 1.8.1 across affected packages: numpy.
What version fixes CVE-2014-1858?
Upgrading to 1.8.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is numpy affected?
Yes, numpy is affected in releases prior to 1.8.1. Upgrade your dependency to 1.8.1 or later.
What is the CVSS score of CVE-2014-1858?
CVE-2014-1858 has a CVSS v3.1 base score of 5.5 (HIGH) with vector string CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2014-1858?
CVE-2014-1858 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check PyPI dependencies for CVE-2014-1858?
Run the dependency tree command: 'pip show numpy'. 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-cw6w-4rcx-xphc",
  "modified" : "2024-10-07T21:15:09Z",
  "published" : "2022-05-14T03:48:04Z",
  "aliases" : [ "CVE-2014-1858" ],
  "summary" : "Arbitrary file write in NumPy",
  "details" : "__init__.py in f2py in NumPy before 1.8.1 allows local users to write to arbitrary files via a symlink attack on a temporary file.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "numpy"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.8.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2014-1858"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/numpy/numpy/pull/4262"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/numpy/numpy/commit/0bb46c1448b0d3f5453d5182a17ea7ac5854ee15"
  }, {
    "type" : "WEB",
    "url" : "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=737778"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1062009"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/91318"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-cw6w-4rcx-xphc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/numpy/numpy"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/numpy/numpy/blob/maintenance/1.8.x/doc/release/1.8.1-notes.rst"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/numpy/PYSEC-2018-33.yaml"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2014-February/128358.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.fedoraproject.org/pipermail/package-announce/2014-February/128781.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2014/02/08/3"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/65441"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-17T21:06:41Z",
    "nvd_published_at" : "2018-01-08T19:29:00Z"
  }
}