{"id":"CVE-2021-3711","details":"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).","aliases":["GHSA-5ww6-px42-wc85","RUSTSEC-2021-0097"],"modified":"2026-11-11T13:05:44.507689122Z","published":"2021-08-24T15:15:09.133Z","related":["SUSE-FU-2022:1419-1","SUSE-SU-2021:2830-1","SUSE-SU-2021:2833-1","SUSE-SU-2022:0751-1","SUSE-SU-2022:1396-1","SUSE-SU-2022:2134-1","SUSE-SU-2022:3676-1","SUSE-SU-2022:4428-1","SUSE-SU-2022:4437-1","SUSE-SU-2022:4439-1","SUSE-SU-2024:0191-1","SUSE-SU-2024:0196-1","openSUSE-SU-2021:1188-1","openSUSE-SU-2021:2830-1","openSUSE-SU-2024:11127-1","openSUSE-SU-2024:11816-1","openSUSE-SU-2025:15136-1"],"database_specific":{"unresolved_ranges":[{"vendor_product":"netapp:e-series_santricity_os_controller","cpes":["cpe:2.3:a:netapp:e-series_santricity_os_controller:*:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"introduced":"11.0"},{"last_affected":"11.50.2"}],"source":"CPE_RANGE"}]},{"cpes":["cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"introduced":"1.1.1"},{"fixed":"1.1.1l"}],"source":"CPE_RANGE"}],"vendor_product":"openssl:openssl"},{"vendor_product":"oracle:essbase","cpes":["cpe:2.3:a:oracle:essbase:*:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"fixed":"11.1.2.4.47"},{"introduced":"21.1"},{"fixed":"21.3"}],"source":"CPE_RANGE"}]},{"cpes":["cpe:2.3:a:oracle:jd_edwards_enterpriseone_tools:*:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"fixed":"9.2.6.3"}],"source":"CPE_RANGE"}],"vendor_product":"oracle:jd_edwards_enterpriseone_tools"},{"vendor_product":"oracle:mysql_connectors","cpes":["cpe:2.3:a:oracle:mysql_connectors:*:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"last_affected":"8.0.27"}],"source":"CPE_RANGE"}]},{"extracted_events":[{"range":[{"last_affected":"8.0.25"}],"source":"CPE_RANGE"}],"vendor_product":"oracle:mysql_enterprise_monitor","cpes":["cpe:2.3:a:oracle:mysql_enterprise_monitor:*:*:*:*:*:*:*:*"]},{"cpes":["cpe:2.3:a:tenable:nessus_network_monitor:*:*:*:*:*:*:*:*"],"extracted_events":[{"source":"CPE_RANGE","range":[{"last_affected":"5.13.1"}]}],"vendor_product":"tenable:nessus_network_monitor"},{"extracted_events":[{"range":[{"introduced":"5.16.0"},{"last_affected":"5.19.1"}],"source":"CPE_RANGE"}],"vendor_product":"tenable:tenable.sc","cpes":["cpe:2.3:a:tenable:tenable.sc:*:*:*:*:*:*:*:*"]},{"vendor_product":"debian:debian_linux","cpes":["cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"introduced":"10.0"},{"last_affected":"10.0"},{"introduced":"11.0"},{"last_affected":"11.0"}],"source":"CPE_STRING"}]},{"cpes":["cpe:2.3:a:oracle:communications_cloud_native_core_security_edge_protection_proxy:1.7.0:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"introduced":"1.7.0"},{"last_affected":"1.7.0"}],"source":"CPE_STRING"}],"vendor_product":"oracle:communications_cloud_native_core_security_edge_protection_proxy"},{"cpes":["cpe:2.3:a:oracle:communications_cloud_native_core_unified_data_repository:1.15.0:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"introduced":"1.15.0"},{"last_affected":"1.15.0"}],"source":"CPE_STRING"}],"vendor_product":"oracle:communications_cloud_native_core_unified_data_repository"},{"vendor_product":"oracle:communications_session_border_controller","cpes":["cpe:2.3:a:oracle:communications_session_border_controller:8.4:*:*:*:*:*:*:*","cpe:2.3:a:oracle:communications_session_border_controller:9.0:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"introduced":"8.4"},{"last_affected":"8.4"},{"introduced":"9.0"},{"last_affected":"9.0"}],"source":"CPE_STRING"}]},{"vendor_product":"oracle:communications_unified_session_manager","cpes":["cpe:2.3:a:oracle:communications_unified_session_manager:8.2.5:*:*:*:*:*:*:*","cpe:2.3:a:oracle:communications_unified_session_manager:8.4.5:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"introduced":"8.2.5"},{"last_affected":"8.2.5"},{"introduced":"8.4.5"},{"last_affected":"8.4.5"}],"source":"CPE_STRING"}]},{"extracted_events":[{"range":[{"introduced":"3.2.0"},{"last_affected":"3.2.0"},{"introduced":"3.3.0"},{"last_affected":"3.3.0"}],"source":"CPE_STRING"}],"vendor_product":"oracle:enterprise_communications_broker","cpes":["cpe:2.3:a:oracle:enterprise_communications_broker:3.2.0:*:*:*:*:*:*:*","cpe:2.3:a:oracle:enterprise_communications_broker:3.3.0:*:*:*:*:*:*:*"]},{"vendor_product":"oracle:enterprise_session_border_controller","cpes":["cpe:2.3:a:oracle:enterprise_session_border_controller:8.4:*:*:*:*:*:*:*","cpe:2.3:a:oracle:enterprise_session_border_controller:9.0:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"introduced":"8.4"},{"last_affected":"8.4"},{"introduced":"9.0"},{"last_affected":"9.0"}],"source":"CPE_STRING"}]},{"vendor_product":"oracle:health_sciences_inform_publisher","cpes":["cpe:2.3:a:oracle:health_sciences_inform_publisher:6.2.1.1:*:*:*:*:*:*:*","cpe:2.3:a:oracle:health_sciences_inform_publisher:6.3.1.1:*:*:*:*:*:*:*"],"extracted_events":[{"source":"CPE_STRING","range":[{"introduced":"6.2.1.1"},{"last_affected":"6.2.1.1"},{"introduced":"6.3.1.1"},{"last_affected":"6.3.1.1"}]}]},{"extracted_events":[{"source":"CPE_STRING","range":[{"introduced":"a9.4"},{"last_affected":"a9.4"}]}],"vendor_product":"oracle:jd_edwards_world_security","cpes":["cpe:2.3:a:oracle:jd_edwards_world_security:a9.4:*:*:*:*:*:*:*"]},{"vendor_product":"oracle:peoplesoft_enterprise_peopletools","cpes":["cpe:2.3:a:oracle:peoplesoft_enterprise_peopletools:8.57:*:*:*:*:*:*:*","cpe:2.3:a:oracle:peoplesoft_enterprise_peopletools:8.58:*:*:*:*:*:*:*","cpe:2.3:a:oracle:peoplesoft_enterprise_peopletools:8.59:*:*:*:*:*:*:*"],"extracted_events":[{"range":[{"introduced":"8.57"},{"last_affected":"8.57"},{"introduced":"8.58"},{"last_affected":"8.58"},{"introduced":"8.59"},{"last_affected":"8.59"}],"source":"CPE_STRING"}]},{"cpes":["cpe:2.3:a:oracle:zfs_storage_appliance_kit:8.8:*:*:*:*:*:*:*"],"extracted_events":[{"source":"CPE_STRING","range":[{"introduced":"8.8"},{"last_affected":"8.8"}]}],"vendor_product":"oracle:zfs_storage_appliance_kit"}]},"references":[{"type":"WEB","url":"https://git.openssl.org/gitweb/?p=openssl.git%3Ba=commitdiff%3Bh=59f5e75f3bced8fc0e130d72a3f582cf7b480b46"},{"type":"WEB","url":"https://lists.apache.org/thread.html/r18995de860f0e63635f3008fd2a6aca82394249476d21691e7c59c9e%40%3Cdev.tomcat.apache.org%3E"},{"type":"WEB","url":"https://lists.apache.org/thread.html/rad5d9f83f0d11fb3f8bb148d179b8a9ad7c6a17f18d70e5805a713d1%40%3Cdev.tomcat.apache.org%3E"},{"type":"ADVISORY","url":"http://www.openwall.com/lists/oss-security/2021/08/26/2"},{"type":"ADVISORY","url":"https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202209-02"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202210-02"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20210827-0010/"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20211022-0003/"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20240621-0006/"},{"type":"ADVISORY","url":"https://www.debian.org/security/2021/dsa-4963"},{"type":"ADVISORY","url":"https://www.openssl.org/news/secadv/20210824.txt"},{"type":"ADVISORY","url":"https://www.tenable.com/security/tns-2021-16"},{"type":"ADVISORY","url":"https://www.tenable.com/security/tns-2022-02"},{"type":"FIX","url":"https://www.oracle.com/security-alerts/cpuapr2022.html"},{"type":"FIX","url":"https://www.oracle.com/security-alerts/cpujan2022.html"},{"type":"FIX","url":"https://www.oracle.com/security-alerts/cpuoct2021.html"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/kzalewski/openssl-1.1.1","events":[{"introduced":"ddb327ab19b29c64c1752cef26c460ca0b7064ec"},{"fixed":"ddb327ab19b29c64c1752cef26c460ca0b7064ec"}],"database_specific":{"extracted_events":[{"source":"CPE_RANGE","cpe":"cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*","range":[{"introduced":"1.1.1"},{"fixed":"1.1.1l"}]}]}}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-3711.json","vanir_signatures":[{"id":"CVE-2021-3711-0115da44","signature_type":"Function","signature_version":"v1","source":"https://github.com/kzalewski/openssl-1.1.1/commit/ddb327ab19b29c64c1752cef26c460ca0b7064ec","target":{"file":"crypto/asn1/a_mbstr.c","function":"ASN1_mbstring_ncopy"},"deprecated":false,"digest":{"function_hash":"145081246022159018632346591780852072638","length":3301}},{"target":{"file":"crypto/pkcs7/pk7_smime.c"},"deprecated":false,"digest":{"line_hashes":["151496904140441974460168482169374190024","252388763391472546762550272601898462670","322392321298523662111637318544365606017","92792830564595161366593755445407076135","125370360892352031658984319622272957499","135472893131710710891792272165369874557","144388576385066123595834036136006620631","251569583518298411383983956510462999062","190752638376984200658169048788492801771","100442701798321830557371459503827921141","157868922838337151802955969179465392317","247133924118207300622477622521703740882"],"threshold":0.9},"id":"CVE-2021-3711-10c2ef8d","signature_type":"Line","signature_version":"v1","source":"https://github.com/kzalewski/openssl-1.1.1/commit/ddb327ab19b29c64c1752cef26c460ca0b7064ec"},{"target":{"function":"out_utf8","file":"crypto/asn1/a_mbstr.c"},"deprecated":false,"digest":{"function_hash":"70418561901620867514045039520920039213","length":148},"id":"CVE-2021-3711-315e1fbb","signature_type":"Function","signature_version":"v1","source":"https://github.com/kzalewski/openssl-1.1.1/commit/ddb327ab19b29c64c1752cef26c460ca0b7064ec"},{"signature_version":"v1","source":"https://github.com/kzalewski/openssl-1.1.1/commit/ddb327ab19b29c64c1752cef26c460ca0b7064ec","target":{"file":"include/openssl/opensslv.h"},"deprecated":false,"digest":{"line_hashes":["131154213046974496778457434048691074837","11412147066710286517722597447846471117","264770296592556677305107142032766937388","276397443140848844849079658380453872857","195870554892312134442829321964179019399"],"threshold":0.9},"id":"CVE-2021-3711-87e36a00","signature_type":"Line"},{"digest":{"threshold":0.9,"line_hashes":["126341431044776940549287222658722596257","130570927788432269899785168744788951172","194169660864360803525450492876473860091","110467782499934282756168500046914951485","263946134258438649256241779625323641089","232531144570205203842568959033909256821","50105547378036962616739399907795763233","35026789599821935911816818772042439275","114710208109255960726965919362105298762","125554540231637930487019176647117002503","332182547294553747961268671162250805775","276033856309860817184326883455361222142","318268129131630080093563577138856184340","128526451235089518533697095563624199685","75522999902161732913968142567093758009","233242365504435285051066046524808432015","197089990496411212407345093272572794903","203627204430850126635677767987115907052","110527555710504927393608627867030602220","129739062881190220811156277727848860285","64544717289057079449815286406570439951","201167284819377777248970251144566099169","222516930768176972010755807924686646230","90961471150301180096894104068604511683","128676851434441285018275177161089865561","129724505883296824298208229090221093179","225269234833384762270352983556638638592","90371650052899301631217696225591147992","246784737627998664119002956221509877842","315371643750711437594895449353374659288","286011929765548229255520019142347591441","220624038106194157196845376518684753434","174882410006964856548150664239804105254","116231510630487651899483668166785513275"]},"id":"CVE-2021-3711-89e18e76","signature_type":"Line","signature_version":"v1","source":"https://github.com/kzalewski/openssl-1.1.1/commit/ddb327ab19b29c64c1752cef26c460ca0b7064ec","target":{"file":"crypto/asn1/tasn_dec.c"},"deprecated":false},{"signature_type":"Line","signature_version":"v1","source":"https://github.com/kzalewski/openssl-1.1.1/commit/ddb327ab19b29c64c1752cef26c460ca0b7064ec","target":{"file":"crypto/asn1/a_mbstr.c"},"deprecated":false,"digest":{"line_hashes":["243971072618222724126117138392541085907","20203436555900253968670420024125559450","261033251671054815966464244630025010874","142558467251092045021326807845044327645","117558078243606577959089637136237792030","124332917225391423252605388545338682722","236022608503733170562534553288003810395","339832511801857794746629870610675811880","219260262152978755644652810379289549161","238161164963855964634408949729400551790","305007661457817428636275014467276783572","224942011457082636465204480559032896603","161399292792765951653776025419102349086","249748745323502641665219507560747603718","133814635171188589537358224623499256384","166636678108051380708454788668826388282","148812255457104429740188330155555022957","67995203963239490129688609208357985916","46589837028236721023105012731504719567","61425611895307496760454057009746874404"],"threshold":0.9},"id":"CVE-2021-3711-8be4f956"},{"id":"CVE-2021-3711-8dac97cc","signature_type":"Function","signature_version":"v1","source":"https://github.com/kzalewski/openssl-1.1.1/commit/ddb327ab19b29c64c1752cef26c460ca0b7064ec","target":{"file":"crypto/cms/cms_pwri.c","function":"cms_RecipientInfo_pwri_crypt"},"deprecated":false,"digest":{"length":2404,"function_hash":"60884720753669845608764646390078165978"}},{"deprecated":false,"digest":{"line_hashes":["319646123228225632035521226865494527950","52841444872899117514496250284924185664","33853134948390324832871761212087746225","81188860042095766577152905858367341175","302749459819436303573414214711383738500","106372169618065324582769687411773396323","255586470514418239073904203556570502151","316909758438434070933019317604952931093","227036639418218030553513135503985645880","19797040175335443903820697047342526981","3213252085324805485799329367541299827","167277605188112932709311947349617776953","33676618202441094170922943458357128290"],"threshold":0.9},"id":"CVE-2021-3711-c30f17c3","signature_type":"Line","signature_version":"v1","source":"https://github.com/kzalewski/openssl-1.1.1/commit/ddb327ab19b29c64c1752cef26c460ca0b7064ec","target":{"file":"crypto/cms/cms_pwri.c"}},{"signature_type":"Function","signature_version":"v1","source":"https://github.com/kzalewski/openssl-1.1.1/commit/ddb327ab19b29c64c1752cef26c460ca0b7064ec","target":{"file":"crypto/asn1/tasn_dec.c","function":"asn1_ex_c2i"},"deprecated":false,"digest":{"function_hash":"219999985288845958916653358585559913606","length":2843},"id":"CVE-2021-3711-db231d4a"},{"target":{"file":"crypto/cms/cms_pwri.c","function":"kek_unwrap_key"},"deprecated":false,"digest":{"function_hash":"130089047505679726786813950750828918851","length":1031},"id":"CVE-2021-3711-df118fd8","signature_type":"Function","signature_version":"v1","source":"https://github.com/kzalewski/openssl-1.1.1/commit/ddb327ab19b29c64c1752cef26c460ca0b7064ec"}],"vanir_signatures_modified":"2026-11-11T13:05:44Z"}},{"ranges":[{"type":"GIT","repo":"https://github.com/mysql/mysql-server","events":[{"introduced":"0"},{"last_affected":"89713bf41c33528c3e7682d219dc838915f5af9a"},{"introduced":"270fd3411e3d671a73ed9725940a30080f59ce6d"},{"last_affected":"beb865a960b9a8a16cf999c323e46c5b0c67f21f"}],"database_specific":{"extracted_events":[{"range":[{"introduced":"5.7.0"},{"last_affected":"5.7.35"}],"source":"CPE_RANGE","cpe":"cpe:2.3:a:oracle:mysql_server:*:*:*:*:*:*:*:*"},{"range":[{"introduced":"8.0.0"},{"last_affected":"8.0.26"}],"source":"CPE_RANGE","cpe":"cpe:2.3:a:oracle:mysql_server:*:*:*:*:*:*:*:*"}]}}],"versions":["mysql-cluster-8.0.26","mysql-8.0.26","mysql-5.7.35","mysql-5.7.32","mysql-5.7.31","mysql-5.1.4","mysql-4.0.4","mysql-4.0.2","mysql-3.23.36","mysql-3.23.33","mysql-3.23.32","mysql-3.23.31","mysql-3.23.30-gamma","mysql-3.23.28-gamma","mysql-3.23.22-beta"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-3711.json"}},{"ranges":[{"type":"GIT","repo":"https://github.com/openssl/openssl","events":[{"introduced":"e04bd3433fd84e1861bf258ea37928d9845e6a86"},{"fixed":"e04bd3433fd84e1861bf258ea37928d9845e6a86"}],"database_specific":{"extracted_events":[{"source":"CPE_RANGE","cpe":"cpe:2.3:a:openssl:openssl:*:*:*:*:*:*:*:*","range":[{"introduced":"1.1.1"},{"fixed":"1.1.1l"}]}]}}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-3711.json","vanir_signatures":[{"digest":{"line_hashes":["28170854778703993674264004058177114599","73132526844288570625317440636111911761","177405411499435185068645597737938634778","224809958623850711330610094965797758930","295554444428855106393106961197201359586"],"threshold":0.9},"id":"CVE-2021-3711-c377fa22","signature_type":"Line","signature_version":"v1","source":"https://github.com/openssl/openssl/commit/e04bd3433fd84e1861bf258ea37928d9845e6a86","target":{"file":"include/openssl/opensslv.h"},"deprecated":false}],"vanir_signatures_modified":"2026-11-11T13:05:44Z"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}