Impact
The SM2 public‑key encryption implementation in the RustCrypto elliptic‑curve crate exhibits a CWE-20 Input Validation weakness, failing to validate the length of input ciphertext before performing operations that split slices. An attacker can provide undersized or specially crafted DER‑encoded data that causes a bounds‑check panic in Rust, which unwinds and terminates the calling thread or the process, resulting in denial of service.
Affected Systems
Affected packages are RustCrypto:elliptic‑curves, specifically the SM2 elliptic curve crate versions 0.14.0‑pre.0 and 0.14.0‑rc.0. Any application that imports this crate and uses the decrypt() function on data originating from untrusted sources is vulnerable.
Risk and Exploitability
With a CVSS score of 7.5 and an EPSS of less than 1%, the likelihood of exploitation is low but the impact is severe. Attackers only need to supply malicious ciphertext to trigger a bounds‑check panic, which terminates the thread or entire process, causing denial of service. The vulnerability is not yet in the CISA KEV catalog, but its severity warrants prompt remediation. In the absence of defensive panic handling, the crash will propagate upward, potentially bringing down critical services.
OpenCVE Enrichment
Github GHSA