9.8

CVE-2021-3711: SM2 Decryption Buffer Overflow

Modified
AliasesALPINE-CVE-2021-3711UBUNTU-CVE-2021-3711DEBIAN-CVE-2021-3711
Published 24-08-2021Last modified 08-10-2026

Vulnerability summary

CVE-2021-3711 is a critical (CVSS 9.8) vulnerability in debian debian_linux. EPSS estimates a 87.82% chance of exploitation in the next 30 days, higher than 99.7% of scored vulnerabilities.

Priority
Prioritisesevere

Severe, CVSS 9.8 (NVD); no exploitation reported by the 5 checked sources; EPSS 88% (FIRST, 03-11-2026)

Source freshness unavailable

How is this decided?
CVSS score
9.8/10
010
Critical · v3.1 (NVD)
EPSS score
87.82%
0%100%
Critical · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 20 · Related 17

Timeline

  1. 24-08-2021
    PublishedVulnerability first disclosed.
  2. 08-10-2026
    Last modifiedVulnerability information updated.

Description

In order to decrypt SM2 encrypted data an application is expected to call the API function EVP_PKEY_decrypt(). Typically an application will call this function twice. The first time, on entry, the "out" parameter can be NULL and, on exit, the "outlen" parameter is populated with the buffer size required to hold the decrypted plaintext. The application can then allocate a sufficiently sized buffer and call EVP_PKEY_decrypt() again, but this time passing a non-NULL value for the "out" parameter. A bug in the implementation of the SM2 decryption code means that the calculation of the buffer size required to hold the plaintext returned by the first call to EVP_PKEY_decrypt() can be smaller than the actual size required by the second call. This can lead to a buffer overflow when EVP_PKEY_decrypt() is called by the application a second time with a buffer that is too small. A malicious attacker who is able present SM2 content for decryption to an application could cause attacker chosen data to overflow the buffer by up to a maximum of 62 bytes altering the contents of other data held after the buffer, possibly changing application behaviour or causing the application to crash. The location of the buffer is application dependent but is typically heap allocated. Fixed in OpenSSL 1.1.1l (Affected 1.1.1-1.1.1k).

CVSS metrics

6 scores · 5 sources · 2 versions

EPSS trend

Probability

87.82%

Chance of exploitation in the next 30 days

Percentile

100%

Versus all other CVEs

30-day change

No change 0.00 pp

From 87.82% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.

Oracle15 products
Netapp12 products
Alpine3 products
  • openssl≥ 1.1.1, < 1.1.1l-r0
  • openssl1.1-compat< 1.1.1l-r0
  • openssl3< 1.1.1l-r0
Debian2 products
Tenable2 products
Crates.Io1 product
  • openssl-src< 111.16.0 | ≥ 0.0.0-0, < 111.16.0
Openssl1 product
  • opensslFixed in OpenSSL 1.1.1l (Affected 1.1.1-1.1.1k) | ≥ 1.1.1, < 1.1.1l
Ubuntu1 product
  • openssl< 1.1.1-1ubuntu2.1~18.04.13 | < 1.1.1-1ubuntu2.fips.2.1~18.04.13.2 | All versions (No fix recorded) | < 1.1.1f-1ubuntu2.8 | < 1.1.1f-1ubuntu2.fips.7.2 | < 1.1.1l-1ubuntu1

8 vendors · 37 products

References

31 links
Show all 31 references