home / blog

2026-11-09 · critical

CVE-2021-3711: Buffer overflow in SM2 decryption

Buffer overflow in OpenSSL SM2 decryption. Up to 62 bytes of overflow possible with CVSS 9.8.

CVE-2021-3711: Buffer overflow in SM2 decryption

CVE-2021-3711 is a buffer overflow vulnerability discovered in the SM2 module of OpenSSL, used for decrypting data according to the SM2 standard (Chinese cryptographic algorithm). The bug resides in the EVP_PKEY_decrypt() function and affects OpenSSL from version 1.1.1 through 1.1.1k. When an application calls this function twice to decrypt SM2 data, the first call returns an insufficient buffer size, causing an overflow of up to 62 bytes on the second call.

The severity is critical with CVSS 9.8. Buffer overflow can overwrite data on the heap adjacent to the destination buffer, altering the contents of other variables, modifying application behavior, or causing the application to crash. The vulnerability was disclosed on August 24, 2021. A recent signal (November 9, 2026) shows active research: public GitHub repository contains a model of the arithmetic calculation of the bug.

System administrators and security teams must verify the OpenSSL version on all systems immediately. If it is 1.1.1k or earlier, it is necessary to update to 1.1.1l or later. Where immediate updates are not possible, verify that all applications using OpenSSL's SM2 module are updated and configure access controls to SM2 decryption functions.

At a glance

What
Bug in buffer size calculation for SM2 decryption in OpenSSL. The EVP_PKEY_decrypt() API returns insufficient size on the first call, causing overflow when the application calls the function a second time with a buffer that is too small.
Severity
Critical. CVSS 9.8. Buffer overflow up to 62 bytes that can alter data of other variables in heap memory, change application behavior or cause crash.
Affected versions
OpenSSL 1.1.1, 1.1.1a, 1.1.1b, 1.1.1c, 1.1.1d, 1.1.1e, 1.1.1f, 1.1.1g, 1.1.1h, 1.1.1i, 1.1.1j, 1.1.1k
Fix
Update to OpenSSL 1.1.1l or later. The vulnerability was published on August 24, 2021.
Status
Vulnerability confirmed and fixed. Recent signal (November 2026) of active research: public GitHub repository contains arithmetic model of the bug.
Action
Verify OpenSSL version on all systems. If it is 1.1.1k or earlier, immediately apply update to 1.1.1l or later. Verify that all applications using OpenSSL's SM2 module are updated.

Sources: NVD, CVE-2021-3711

← All articles