CVE-2026-22700: RustCrypto Has Insufficient Length Validation in decrypt() in SM2-PKE
A denial-of-service vulnerability exists in the SM2 public-key encryption (PKE) implementation: the decrypt() path performs unchecked slice::split_at operations on input buffers derived from untrusted ciphertext. An attacker can submit short/undersized ciphertext or carefully-crafted DER-encoded structures to trigger bounds-check panics (Rust unwinding) which crash the calling thread or process.
References
- github.com/RustCrypto/elliptic-curves
- github.com/RustCrypto/elliptic-curves/commit/e60e99167a9a2b187ebe80c994c5204b0fdaf4ab
- github.com/RustCrypto/elliptic-curves/pull/1603
- github.com/RustCrypto/elliptic-curves/security/advisories/GHSA-j9xq-69pf-pcm8
- github.com/advisories/GHSA-j9xq-69pf-pcm8
- nvd.nist.gov/vuln/detail/CVE-2026-22700
Code Behaviors & Features
Detect and mitigate CVE-2026-22700 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →