Vulnerability library
Security checkNovember 03, 2025

sha.js is missing type checks leading to hash rewind and passing on crafted data

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

High severitynpmsha.js

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

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.

Recommendation

Update the sha.js package to the latest compatible version. Followings are version details:

  • Affected version(s): <= 2.4.11
  • Patched version(s): 2.4.12

References

Could your website be exposed too?

SmartScanner can check your website for sha.js is missing type checks leading to hash rewind and passing on crafted data and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated November 03, 2025