Lookup for vulnerabilities affecting packages.

GET /api/vulnerabilities/13891?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "url": "http://public2.vulnerablecode.io/api/vulnerabilities/13891?format=api",
    "vulnerability_id": "VCID-tev7-7t96-aber",
    "summary": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')\nThe npm package \"tar\" (aka node-tar) before versions 6.1.1, 5.0.6, 4.4.14, and 3.3.2 has a arbitrary File Creation/Overwrite vulnerability due to insufficient absolute path sanitization. node-tar aims to prevent extraction of absolute file paths by turning absolute paths into relative paths when the `preservePaths` flag is not set to `true`. This is achieved by stripping the absolute path root from any absolute file paths contained in a tar file. For example `/home/user/.bashrc` would turn into `home/user/.bashrc`. This logic was insufficient when file paths contained repeated path roots such as `////home/user/.bashrc`. `node-tar` would only strip a single path root from such paths. When given an absolute file path with repeating path roots, the resulting path (e.g. `///home/user/.bashrc`) would still resolve to an absolute path, thus allowing arbitrary file creation and overwrite. This issue was addressed in releases 3.2.2, 4.4.14, 5.0.6 and 6.1.1. Users may work around this vulnerability without upgrading by creating a custom `onentry` method which sanitizes the `entry.path` or a `filter` method which removes entries with absolute paths. See referenced GitHub Advisory for details. Be aware of CVE-2021-32803 which fixes a similar bug in later versions of tar.",
    "aliases": [
        {
            "alias": "CVE-2021-32804"
        },
        {
            "alias": "GHSA-3jfq-g458-7qm9"
        }
    ],
    "fixed_packages": [
        {
            "url": "http://public2.vulnerablecode.io/api/packages/57598?format=api",
            "purl": "pkg:npm/tar@3.2.2",
            "is_vulnerable": false,
            "affected_by_vulnerabilities": [],
            "resource_url": "http://public2.vulnerablecode.io/packages/pkg:npm/tar@3.2.2"
        },
        {
            "url": "http://public2.vulnerablecode.io/api/packages/57599?format=api",
            "purl": "pkg:npm/tar@4.4.14",
            "is_vulnerable": false,
            "affected_by_vulnerabilities": [],
            "resource_url": "http://public2.vulnerablecode.io/packages/pkg:npm/tar@4.4.14"
        },
        {
            "url": "http://public2.vulnerablecode.io/api/packages/57600?format=api",
            "purl": "pkg:npm/tar@5.0.6",
            "is_vulnerable": false,
            "affected_by_vulnerabilities": [],
            "resource_url": "http://public2.vulnerablecode.io/packages/pkg:npm/tar@5.0.6"
        },
        {
            "url": "http://public2.vulnerablecode.io/api/packages/57601?format=api",
            "purl": "pkg:npm/tar@6.1.1",
            "is_vulnerable": false,
            "affected_by_vulnerabilities": [],
            "resource_url": "http://public2.vulnerablecode.io/packages/pkg:npm/tar@6.1.1"
        }
    ],
    "affected_packages": [
        {
            "url": "http://public2.vulnerablecode.io/api/packages/57589?format=api",
            "purl": "pkg:npm/tar@4.0.0",
            "is_vulnerable": true,
            "affected_by_vulnerabilities": [
                {
                    "vulnerability": "VCID-tev7-7t96-aber"
                },
                {
                    "vulnerability": "VCID-wu2w-3mxd-g3ha"
                }
            ],
            "resource_url": "http://public2.vulnerablecode.io/packages/pkg:npm/tar@4.0.0"
        },
        {
            "url": "http://public2.vulnerablecode.io/api/packages/57590?format=api",
            "purl": "pkg:npm/tar@5.0.0",
            "is_vulnerable": true,
            "affected_by_vulnerabilities": [
                {
                    "vulnerability": "VCID-msgt-95hz-5yhe"
                },
                {
                    "vulnerability": "VCID-tev7-7t96-aber"
                },
                {
                    "vulnerability": "VCID-v62c-ranz-fbfv"
                },
                {
                    "vulnerability": "VCID-wu2w-3mxd-g3ha"
                },
                {
                    "vulnerability": "VCID-yady-yadh-sfcy"
                }
            ],
            "resource_url": "http://public2.vulnerablecode.io/packages/pkg:npm/tar@5.0.0"
        },
        {
            "url": "http://public2.vulnerablecode.io/api/packages/57591?format=api",
            "purl": "pkg:npm/tar@6.0.0",
            "is_vulnerable": true,
            "affected_by_vulnerabilities": [
                {
                    "vulnerability": "VCID-msgt-95hz-5yhe"
                },
                {
                    "vulnerability": "VCID-tev7-7t96-aber"
                },
                {
                    "vulnerability": "VCID-v62c-ranz-fbfv"
                },
                {
                    "vulnerability": "VCID-wu2w-3mxd-g3ha"
                },
                {
                    "vulnerability": "VCID-yady-yadh-sfcy"
                }
            ],
            "resource_url": "http://public2.vulnerablecode.io/packages/pkg:npm/tar@6.0.0"
        }
    ],
    "references": [
        {
            "reference_url": "https://api.first.org/data/v1/epss?cve=CVE-2021-32804",
            "reference_id": "",
            "reference_type": "",
            "scores": [
                {
                    "value": "0.84982",
                    "scoring_system": "epss",
                    "scoring_elements": "0.99364",
                    "published_at": "2026-05-30T12:55:00Z"
                }
            ],
            "url": "https://api.first.org/data/v1/epss?cve=CVE-2021-32804"
        },
        {
            "reference_url": "https://github.com/npm/node-tar/commit/1f036ca23f64a547bdd6c79c1a44bc62e8115da4",
            "reference_id": "",
            "reference_type": "",
            "scores": [],
            "url": "https://github.com/npm/node-tar/commit/1f036ca23f64a547bdd6c79c1a44bc62e8115da4"
        },
        {
            "reference_url": "https://www.npmjs.com/advisories/1770",
            "reference_id": "",
            "reference_type": "",
            "scores": [],
            "url": "https://www.npmjs.com/advisories/1770"
        },
        {
            "reference_url": "https://www.npmjs.com/package/tar",
            "reference_id": "",
            "reference_type": "",
            "scores": [],
            "url": "https://www.npmjs.com/package/tar"
        },
        {
            "reference_url": "https://www.oracle.com/security-alerts/cpuoct2021.html",
            "reference_id": "",
            "reference_type": "",
            "scores": [],
            "url": "https://www.oracle.com/security-alerts/cpuoct2021.html"
        },
        {
            "reference_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-32804",
            "reference_id": "CVE-2021-32804",
            "reference_type": "",
            "scores": [],
            "url": "https://nvd.nist.gov/vuln/detail/CVE-2021-32804"
        },
        {
            "reference_url": "https://github.com/advisories/GHSA-3jfq-g458-7qm9",
            "reference_id": "GHSA-3jfq-g458-7qm9",
            "reference_type": "",
            "scores": [],
            "url": "https://github.com/advisories/GHSA-3jfq-g458-7qm9"
        },
        {
            "reference_url": "https://github.com/npm/node-tar/security/advisories/GHSA-3jfq-g458-7qm9",
            "reference_id": "GHSA-3jfq-g458-7qm9",
            "reference_type": "",
            "scores": [],
            "url": "https://github.com/npm/node-tar/security/advisories/GHSA-3jfq-g458-7qm9"
        }
    ],
    "weaknesses": [
        {
            "cwe_id": 1035,
            "name": "OWASP Top Ten 2017 Category A9 - Using Components with Known Vulnerabilities",
            "description": "Weaknesses in this category are related to the A9 category in the OWASP Top Ten 2017."
        },
        {
            "cwe_id": 22,
            "name": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')",
            "description": "The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory."
        },
        {
            "cwe_id": 78,
            "name": "Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')",
            "description": "The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component."
        },
        {
            "cwe_id": 937,
            "name": "OWASP Top Ten 2013 Category A9 - Using Components with Known Vulnerabilities",
            "description": "Weaknesses in this category are related to the A9 category in the OWASP Top Ten 2013."
        }
    ],
    "exploits": [],
    "severity_range_score": null,
    "exploitability": null,
    "weighted_severity": null,
    "risk_score": null,
    "resource_url": "http://public2.vulnerablecode.io/vulnerabilities/VCID-tev7-7t96-aber"
}