Breaking News: Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2021-3711

openssl: SM2 Decryption Buffer Overflow

Overview

Published
24 Aug 2021
Modified
8 Oct 2026
Critical CVE
3 Registry packages
23 OS packages
11 Linux distributions
Yes Fix available

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).

Source: OX vulnerability database

Severity

9.8 · CRITICAL

CVSS 3.1 base score, scored by NVD.

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weakness: CWE-120

Affected packages · 3

Packages affected by CVE-2021-3711
EcosystemPackageVulnerableFixed in
Cargo (Rust) openssl-src <111.16.0 111.16.0
Conan (C/C++) openssl >=1.1.1 <1.1.1l 1.1.1o
Julia OpenSSL_jll <1.1.13+0 1.1.13+0

Open a package to see all its vulnerabilities.

Operating systems · 32 fixes

Azure Linux 1 release · 1 package

fixed 1
edk2
Azure Linux fixes for CVE-2021-3711
ReleasePackageFixed in
3.0 edk2 0:20240223gitedc6681206c1-1.azl3

Photon OS 1 release · 1 package

fixed 1
openssl
Photon OS fixes for CVE-2021-3711
ReleasePackageFixed in
4.0 openssl +4 1.1.1l-1.ph4

SUSE Linux Enterprise 2 releases · 3 packages

fixed 3
libopenssl-1-1-devel golang-github-prometheus-node-exporter grafana
SUSE Linux Enterprise fixes for CVE-2021-3711
ReleasePackageFixed inAdvisory
12.5 libopenssl-1-1-devel +4 1.1.1d-2.36.2 SUSE-SU-2021:2833-1
12.5 golang-github-prometheus-node-exporter 1.3.0-1.15.3 SUSE-SU-2022:2134-1
15.4 grafana 8.5.13-150200.3.29.5 SUSE-SU-2022:4428-1

SUSE Linux Enterprise Micro 1 release · 1 package

fixed 1
libopenssl1-1
SUSE Linux Enterprise Micro fixes for CVE-2021-3711
ReleasePackageFixed inAdvisory
5.0 libopenssl1-1 +1 1.1.1d-11.27.1 SUSE-SU-2021:2830-1

alpine 4 releases · 1 package

fixed 4
openssl
alpine fixes for CVE-2021-3711
ReleasePackageFixed in
3.22 openssl 1.1.1l-r0
3.23 openssl 1.1.1l-r0
3.24 openssl 1.1.1l-r0
edge openssl 1.1.1l-r0

debian 5 releases · 1 package

fixed 5
openssl
debian fixes for CVE-2021-3711
ReleasePackageFixed in
10 openssl 1.1.1d-0+deb10u7
11 openssl 1.1.1k-1+deb11u1
12 openssl 1.1.1l-1
13 openssl 1.1.1l-1
14 openssl 1.1.1l-1

echo 1 release · 4 packages

fixed 4
openssl-1-1-1c openssl-1-1-1g openssl-1-1-1k openssl
echo fixes for CVE-2021-3711
ReleasePackageFixed in
openssl-1-1-1c 1.1.1c+e1
openssl-1-1-1g 1.1.1g+e1
openssl-1-1-1k 1.1.1k+e1
openssl 1.1.1l-1

openSUSE 1 release · 3 packages

fixed 3
grype libopenssl-1-1-devel grafana
openSUSE fixes for CVE-2021-3711
ReleasePackageFixed inAdvisory
Tumbleweed grype +3 0.92.1-1.1 openSUSE-SU-2025:15136-1
Tumbleweed libopenssl-1-1-devel +6 1.1.1l-1.2 openSUSE-SU-2024:11127-1
Tumbleweed grafana 8.3.4-1.1 openSUSE-SU-2024:11816-1

root.io alpine 1 release · 1 package

fixed 1
rootio-openssl
root.io alpine fixes for CVE-2021-3711
ReleasePackageFixed in
3.23 rootio-openssl 1.1.1l-r0

root.io debian 2 releases · 1 package

fixed 2
rootio-openssl
root.io debian fixes for CVE-2021-3711
ReleasePackageFixed in
11 rootio-openssl 1.1.1k-1+deb11u1
12 rootio-openssl 1.1.1l-1

ubuntu 7 releases · 1 package

fixed 7
openssl
ubuntu fixes for CVE-2021-3711
ReleasePackageFixed in
18.04 openssl 1.1.1-1ubuntu2.1~18.04.13
18.04-ESM openssl 1.1.1-1ubuntu2.1~18.04.13
20.04 openssl 1.1.1f-1ubuntu2.8
20.04-ESM openssl 1.1.1f-1ubuntu2.8
22.04 openssl 1.1.1l-1ubuntu1
24.04 openssl 1.1.1l-1ubuntu1

1 more row

References

Show all 29 references

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.