Critical severity · published Aug 24, 2021
CVE-2021-3711
SM2 Decryption Buffer Overflow
9.8
CVSS
87.8%
EPSS
No
On KEV
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 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)87.8% · higher than 100% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
OP
OpenSSL · OpenSSL
Fixed in OpenSSL 1.1.1l (Affected 1.1.1-1.1.1k) · source: vendor, NVD
AI
Active IQ Unified Manager · Netapp
All versions, or not specified · source: NVD
CD
Clustered Data Ontap · Netapp
All versions, or not specified · source: NVD
CD
Clustered Data Ontap Antivirus Connector · Netapp
All versions, or not specified · source: NVD
CC
Communications Cloud Native Core Security Edge Protection Proxy · Oracle
1.7.0 · source: NVD
CC
Communications Cloud Native Core Unified Data Repository · Oracle
1.15.0 · source: NVD
CS
Communications Session Border Controller · Oracle
8.4; 9.0 · source: NVD
CU
Communications Unified Session Manager · Oracle
8.2.5; 8.4.5 · source: NVD
DL
Debian Linux · Debian
10.0; 11.0 · source: NVD
ES
E-series Santricity OS Controller · Netapp
11.0 through 11.50.2 · source: NVD
EC
Enterprise Communications Broker · Oracle
3.2.0; 3.3.0 · source: NVD
ES
Enterprise Session Border Controller · Oracle
8.4; 9.0 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2021-3711
CVE.org
https://www.cve.org/CVERecord?id=CVE-2021-3711
Mailing List
http://www.openwall.com/lists/oss-security/2021/08/26/2
Third Party Advisory
https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf
git.openssl.org
https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=59f5e75f3bced8fc0e130d72a3f582cf7b480b46
lists.apache.org
https://lists.apache.org/thread.html/r18995de860f0e63635f3008fd2a6aca82394249476d21691e7c59c9e%40%3Cdev.tomcat.apache.org%3E
lists.apache.org
https://lists.apache.org/thread.html/rad5d9f83f0d11fb3f8bb148d179b8a9ad7c6a17f18d70e5805a713d1%40%3Cdev.tomcat.apache.org%3E
Third Party Advisory
https://security.gentoo.org/glsa/202209-02
More from OpenSSL
7.5
CVE-2014-0160
OpenSSL Information Disclosure Vulnerability
9.8
CVE-2026-63073
Untrusted Sender DN Used as Format String in CMP Response Validation
9.8
CVE-2026-31789
Heap Buffer Overflow in Hexadecimal Conversion
9.8
CVE-2022-2274
RSA implementation bug in AVX512IFMA instructions
9.8
CVE-2016-6309
statem/statem.c in OpenSSL 1.1.0a does not consider memory-block movement after a realloc call, which allows remote attackers to cause a denial of service (use-after-free) or…
