Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. cipher-base
  4. ›
  5. CVE-2025-9287

CVE-2025-9287: cipher-base is missing type checks, leading to hash rewind and passing on crafted data

August 21, 2025 (updated September 13, 2025)

This affects e.g. create-hash (and crypto-browserify), so I’ll describe the issue against that package Also affects create-hmac and other packages

Node.js createHash works only on strings or instances of Buffer, TypedArray, or DataView.

Missing 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.

References

  • github.com/advisories/GHSA-cpq7-6gpm-g9rc
  • github.com/browserify/cipher-base
  • github.com/browserify/cipher-base/commit/8fd136432ca298a664f5637629cf2b42a6c7f294
  • github.com/browserify/cipher-base/pull/23
  • github.com/browserify/cipher-base/security/advisories/GHSA-cpq7-6gpm-g9rc
  • nvd.nist.gov/vuln/detail/CVE-2025-9287

Code Behaviors & Features

Detect and mitigate CVE-2025-9287 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.0.5

Fixed versions

  • 1.0.5

Solution

Upgrade to version 1.0.5 or above.

Impact 9.1 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-20: Improper Input Validation

Source file

npm/cipher-base/CVE-2025-9287.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Fri, 26 Sep 2025 00:21:19 +0000.