CVE-2026-23966

sm-crypto Affected by Private Key Recovery in SM2-PKE

Published Jan 22, 2026 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The vulnerability resides in the SM2 decryption routine of the sm-crypto library. By repeatedly calling the SM2 decryption interface, an attacker can recover the full private key after only a few hundred interactions. The success of this attack directly leaks the cryptographic secret, undermining all confidentiality and integrity guarantees that rely on SM2 keys.

Affected Systems

The affected product is sm-crypto from JuneAndGreen. Any deployment running a version earlier than 0.3.14 is vulnerable. Version 0.3.14 and later contain the patch that fixes the recovery flaw.

Risk and Exploitability

The CVSS score of 9.1 classifies this flaw as critical. Although the EPSS score is below 1%, indicating a low current exploitation probability, the vulnerability is not listed in the CISA KEV catalog. An attacker must be able to invoke the SM2 decryption function, which is typically exposed through application code; therefore the attack vector is inferred to be through the application’s usage of the library rather than a network exploit. Given the high impact of private key leakage, the overall risk to any system that depends on SM2 remains significant until the library is updated.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade sm-crypto to version 0.3.14 or newer; use a package manager to install the fixed release.
  • Review all uses of SM2 encryption and decryption in the codebase; replace any legacy calls that may still reference the vulnerable functions.
  • If an immediate upgrade is not possible, remove SM2 functionality from public-facing components and temporarily disable decryption operations until the patch is applied.

Generated by OpenCVE AI on April 18, 2026 at 03:58 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-pgx9-497m-6c4v sm-crypto Affected by Private Key Recovery in SM2-PKE
History
Type Values Removed Values Added
CPEs cpe:2.3:a:juneandgreen:sm-crypto:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Juneandgreen
Juneandgreen sm-crypto
Vendors & Products Juneandgreen
Juneandgreen sm-crypto
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title sm-crypto Affected by Private Key Recovery in SM2-PKE
Weaknesses CWE-345
References
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}

Weaknesses
  • CWE-345

    Insufficient Verification of Data Authenticity

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jan 22, 2026, 3:49 PM
Reserved
Jan 19, 2026, 2:49 PM
Status
Analyzed
Published
Jan 22, 2026, 3:15 AM
Modified
Jun 17, 2026, 10:22 AM