CVE-2026-23966: sm-crypto Private Key Recovery Vulnerability

sm-crypto Updated 21 Jan 2026

Summary

21/01/2026
Yes i
Critical
9.1

CVE-2026-23966: sm-crypto Affected by Private Key Recovery in SM2-PKE. Affects sm-crypto versions < 0.3.14. Fixed in 0.3.14. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

sm-crypto is an npm package that provides cryptographic functions based on the Chinese SM2 standard, primarily used for public key encryption. It is designed to facilitate secure data transmission and storage. However, it has been found to contain a critical vulnerability that allows attackers to recover private keys through repeated interactions with the decryption interface.

Vulnerability Detail

A private key recovery vulnerability exists in the SM2 decryption logic of the sm-crypto package. This flaw allows an attacker to exploit the decryption interface by interacting with it multiple times, ultimately leading to the full recovery of the private key. The vulnerability stems from insufficient safeguards in the decryption process, making it susceptible to targeted attacks. The ramifications of this vulnerability are severe, as it compromises the confidentiality and integrity of encrypted data, potentially exposing sensitive information.

How To Fix

Minimum fixed version

0.3.14

This is the first release that contains the fix.

npm install sm-crypto@0.3.14

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users should limit the number of interactions with the SM2 decryption interface and avoid using the affected version of the package until it has been updated. Additionally, consider using alternative cryptographic libraries that do not exhibit this vulnerability.

Conclusion

The sm-crypto package has a critical vulnerability that allows for private key recovery through repeated interactions with its decryption interface. Users are strongly advised to update to version 0.3.14 or later to protect against potential attacks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for sm-crypto →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 9.1, indicating a critical level of severity.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The potential consequences include unauthorized access to sensitive data, loss of confidentiality, and compromise of cryptographic integrity.

This vulnerability was discovered by the XlabAI Team of Tencent Xuanwu Lab and the Atuin Automated Vulnerability Discovery Engine.

Yes, a patch is available in version 0.3.14 of the sm-crypto package. Users should update to this version to mitigate the vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for sm-crypto.

How To Fix

Minimum fixed version

0.3.14

This is the first release that contains the fix.

npm install sm-crypto@0.3.14

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback