Listen to this Post
How the CVE Works
This critical vulnerability exists within the `sm2` Rust crate’s Public Key Encryption (PKE) decryption logic. During decryption, the library decodes the C1 field—an elliptic-curve point—from the ciphertext. It uses `AffinePoint::from_encoded_point()` to convert this decoded point. This function returns a `CtOption
DailyCVE Form
Platform: Rust `sm2` crate
Version: Not specified
Vulnerability: Denial-of-Service
Severity: Critical
Date: Not specified
Prediction: 2026-04-10
What Undercode Say: Analytics
Bash commands and codes related to the blog
RUST_BACKTRACE=1 cargo run --example poc_der_invalid_point --features std
cargo run --example poc_der_invalid_point
How Exploit:
Craft ASN.1 DER ciphertext with invalid X/Y coordinates.
Submit to `DecryptingKey::decrypt_der()`.
Trigger panic on `.unwrap()` call.
Protection from this CVE
Replace `.unwrap()` with proper error handling.
Use match on `CtOption` result.
Return library `Err` for invalid points.
Impact:
Service crash (DoS).
Low attacker effort.
Widespread exposure risk.
🎯Let’s Practice Exploiting & Learn Patching For Free:
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

