sm-crypto provides JavaScript implementations of the Chinese cryptographic algorithms SM2, SM3, and SM4. A private key recovery vulnerability exists i...
Description
sm-crypto provides JavaScript implementations of the Chinese cryptographic algorithms SM2, SM3, and SM4. A private key recovery vulnerability exists in the SM2 decryption logic of sm-crypto prior to version 0.3.14. By interacting with the SM2 decryption interface multiple times, an attacker can fully recover the private key within approximately several hundred interactions. Version 0.3.14 patches the issue.
AI Analyst Comment
Remediation
Update Unknown Multiple Products to the latest version. Monitor for exploitation attempts and review access logs.
Executive Summary:
A critical vulnerability has been identified in the sm-crypto library, a component used in multiple products for cryptographic functions. This flaw allows a remote attacker to steal the secret private key used for decryption by repeatedly interacting with an affected system. Successful exploitation would lead to a total loss of data confidentiality, enabling attackers to decrypt sensitive information and impersonate the compromised system.
Vulnerability Details
CVE-ID: CVE-2026-23966
Affected Software: Unknown Multiple Products (any product incorporating the sm-crypto library)
Affected Versions: sm-crypto library versions prior to 0.3.14
Vulnerability: The vulnerability is a private key recovery weakness within the SM2 decryption implementation of the sm-crypto library. An unauthenticated, remote attacker can exploit this flaw by sending a series of specially crafted ciphertexts to an application endpoint that utilizes the vulnerable library for decryption. By analyzing the server's responses to these crafted inputs (e.g., error messages or timing differences, also known as a side-channel attack), the attacker can incrementally deduce the bits of the server's private key. The entire private key can be reconstructed after approximately several hundred such interactions.
Business Impact
This vulnerability is rated as critical severity with a CVSS score of 9.1, reflecting the profound potential for damage. The primary business impact is the complete compromise of data confidentiality for all information protected by the affected SM2 key. An attacker in possession of the private key can decrypt all historical and future encrypted data, bypass security controls, and forge digital signatures to impersonate the legitimate owner. This could result in catastrophic data breaches, exposure of trade secrets, violation of data privacy regulations (e.g., GDPR, CCPA), significant financial loss, and severe reputational harm.
Remediation Plan
Immediate Action: The primary remediation is to identify all assets that utilize the
sm-cryptolibrary and update it to version 0.3.14 or newer. Since the vulnerability exists in a third-party library, organizations must engage with their software vendors to obtain and apply the necessary patches for affected products. In the interim, closely monitor application logs and network traffic for signs of exploitation, such as a high volume of decryption errors originating from a single source IP address.Proactive Monitoring: Implement enhanced monitoring on public-facing endpoints that perform SM2 decryption. Security teams should create alerts for an abnormally high rate of decryption failures or repeated connection attempts from a single source within a short time frame. Analyze application logs for cryptographic error patterns that could indicate an attacker is probing the decryption oracle.
Compensating Controls: If immediate patching is not feasible, implement compensating controls to mitigate the risk. Apply strict rate-limiting to the affected decryption interface to drastically slow down the attack, making the several hundred required interactions impractical. A Web Application Firewall (WAF) can be configured to temporarily block IP addresses that exhibit attack patterns. If possible, restrict access to the vulnerable endpoint to only trusted sources.
Exploitation Status
Public Exploit Available: false
Analyst Notes: As of Jan 22, 2026, there is no known publicly available exploit code, and the vulnerability is not reported to be actively exploited in the wild. However, given the critical severity and the detailed nature of the vulnerability, it is highly probable that threat actors will develop exploit tools rapidly. The primary challenge for defenders is the identification of all affected products, as this is a supply chain vulnerability affecting a third-party library.
Analyst Recommendation
This vulnerability represents a grave and immediate risk to the organization. The potential for complete private key recovery and data decryption warrants the highest priority for remediation. The security team must immediately initiate an asset inventory and software composition analysis to identify all systems and applications using the vulnerable
sm-cryptolibrary. Due to the CVSS 9.1 (Critical) score, patching must be treated as an emergency action. Although not currently on the CISA KEV list, its severity makes it a likely candidate, and it should be remediated with the same urgency as a known exploited vulnerability.