CVE-2025-9288 represents a critical vulnerability discovered in the sha.js library, a JavaScript implementation of SHA-1, SHA-256, SHA-3, and SHA-512 hashing algorithms. This flaw stems from inadequate input type validation, allowing attackers to inject malicious payloads that can manipulate the hash state. Affected versions of Node.js utilizing sha.js are susceptible, and a fix is available in version 2.4.12.
CVE-2025-9288 在 sha.js 中源于缺乏输入类型检查。这允许传递除良好格式化的 Buffer 或 string 之外的类型,可能导致无效值、挂起以及哈希状态回滚(包括将标记哈希转换为未标记哈希),或其它通常无法预测的行为。攻击者可以利用此漏洞通过操纵哈希过程来破坏数据完整性,尤其是在依赖 SHA 哈希函数安全性的应用程序中。该漏洞的严重程度在 CVSS 规模上评为 9.1,表明存在高风险。强烈建议升级到 2.4.12 或更高版本以减轻此风险。
攻击者可以通过向 sha.js 哈希函数提供恶意输入来利用此漏洞。此输入可能是一种无效的数据结构或一种意外的数据类型。通过操纵内部哈希状态,攻击者可能潜在地更改哈希结果,这可能会对依赖哈希完整性的应用程序产生严重后果,例如数字签名验证或安全密码存储。成功的利用可能允许攻击者伪造数据、绕过安全控制或破坏信息机密性。
Applications relying on sha.js for cryptographic hashing, particularly those handling untrusted input, are at significant risk. This includes web applications, backend services, and any Node.js projects utilizing sha.js directly or as a dependency. Projects that have not implemented robust input validation practices are particularly vulnerable.
• nodejs / server:
ps aux | grep sha.js• nodejs / supply-chain:
npm ls sha.js• nodejs / server:
npm audit sha.js• nodejs / server:
find / -name 'sha.js' -type fdisclosure
漏洞利用状态
EPSS
0.05% (14% 百分位)
CISA SSVC
CVE-2025-9288 的主要缓解措施是升级到 sha.js 的 2.4.12 或更高版本。此版本包含必要的修复程序,以正确验证输入类型并防止无法预测的行为。如果无法立即升级,请检查使用 sha.js 的代码,以确保仅将良好格式化的 Buffer 或字符串作为输入传递。此外,在升级完成之前,密切监控使用 sha.js 的应用程序是否存在任何异常行为。
Actualice la dependencia sha.js a una versión posterior a la 2.4.11. Esto puede hacerse ejecutando `npm update sha.js` o `yarn upgrade sha.js` en su proyecto. Verifique que la versión instalada sea la correcta después de la actualización.
漏洞分析和关键警报直接发送到您的邮箱。
sha.js 是一个用于计算 SHA(安全哈希算法)哈希函数的 JavaScript 库。
此更新修复了一个安全漏洞,该漏洞可能允许攻击者操纵哈希过程并破坏数据完整性。
如果您无法立即更新,请检查您的代码,以确保仅将良好格式化的 Buffer 或字符串作为输入传递给 sha.js。
检查您正在使用的 sha.js 版本。如果它早于版本 2.4.12,则您容易受到攻击。
您可以在 GitHub 安全建议中找到有关此漏洞的更多信息:https://github.com/browserify/cipher-base/security/advisories/GHSA-cpq7-6gpm-g9rc
CVSS 向量