CVE-2026-22700CWE-20

RustCrypto Has Insufficient Length Validation in decrypt() in SM2-PKE

High · published January 10, 2026

CVSS v3.1
7.5
EPSS
0%
Percentile
22.8
In the wild
Unconfirmed
What it is

⚡ A crafty input could crash your server! In versions 0.14.0-pre.0 and 0.14.0-rc.0 of RustCrypto's Elliptic Curves, attackers can exploit a denial-of-service vulnerability lurking in the SM2 decryption process! Think of it like a barista trying to brew your coffee with a defective coffee machine – one wrong input, and the whole process grinds to a halt! Here, an attacker can send in poorly-sized data that causes the program to panic and crash, just like that coffee maker refusing to work when it receives the wrong filter size. This vulnerability could be absolutely devastating, as an attacker leveraging this flaw can cause the calling thread or process to crash, leading to potential downtime and disruption of services. Imagine your application going dark at the worst possible moment, all because it couldn't handle a sneaky slice of bad input!

Put simply

Think of it like a barista trying to brew your coffee with a defective coffee machine – one wrong input, and the whole process grinds to a halt! Here, an attacker can send in poorly-sized data that causes the program to panic and crash, just like that coffee maker refusing to work when it receives the wrong filter size. The issue lies in the unchecked slice::split_at operations on input buffers during the decrypt() process, allowing carefully-crafted short or malformed ciphertext to trigger bounds-check panics in the Rust environment, consequently crashing the application.

What to do

This vulnerability could be absolutely devastating, as an attacker leveraging this flaw can cause the calling thread or process to crash, leading to potential downtime and disruption of services. Imagine your application going dark at the worst possible moment, all because it couldn't handle a sneaky slice of bad input! To mitigate this vulnerability, patch immediately to the latest version of RustCrypto that includes the fix from commit e60e991. Additionally, review your input validation processes to ensure all incoming data is properly checked before being processed. You've got this! With these steps, you can secure your systems and keep them running smoothly. 🛡️

The record
Technical detail
CVSS v3.1
7.5 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS v4.0
Not supplied
EPSS
0.00312 · 22.8th percentile
Weakness
CWE-20 · Improper Input Validation
Published
2026-01-10T05:17Z
EPSS history
Timeline
  • 10 JAN 05:17Z
    RustCrypto Has Insufficient Length Validation in decrypt() in SM2-PKE
    cvelistv5