sm-crypto, Private Key Recovery in SM2-PKE, CVE-2026-12345 (Critical)

Listen to this Post

How the Mentioned CVE Works

The vulnerability CVE-2026-12345 resides in the SM2 public key encryption (SM2-PKE) decryption implementation of the `sm-crypto` library. During the decryption process, the library fails to properly validate or securely handle certain mathematical components derived from the ciphertext. Specifically, the flaw allows an attacker to submit specially crafted, invalid ciphertexts to the decryption oracle. By observing the system’s responses (whether decryption succeeds or fails, or through timing differences), an adversary can glean information about the internal secret nonce used in the process. This information leakage is systematic. By repeating this interaction several hundred times with different crafted inputs, the attacker can perform lattice-based or algebraic cryptanalysis. This analysis progressively recovers the secret scalar values, ultimately leading to the full computation and exposure of the static private key associated with the SM2 key pair.

dailycve form:

Platform: sm-crypto
Version: < v3.0.0
Vulnerability: Private Key Recovery
Severity: Critical
date: 2026-01-20

Prediction: Patch expected 2026-02-10

(end of form)

What Undercode Say:

Analytics: Decryption oracle abuse.

openssl pkeyutl -decrypt -in crafted_ct.bin -inkey private.pem -out /dev/null
Repeated calls leak nonce bits.
PoC Skeleton
for i in range(500):
response = send_crafted_ct(ct_variants[bash])
leaks.append(analyze(response))
private_key = lattice_attack(leaks)

How Exploit:

Attacker crafts invalid ciphertexts. Queries decryption oracle repeatedly. Analyzes error/timing responses. Computes private key via cryptanalysis.

Protection from this CVE

Apply official patch. Disable vulnerable version. Implement ciphertext validation.

Impact:

Complete private key compromise. Loss of confidentiality. Signature forgery. Trust chain breach.

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top