{"id":"CVE-2022-4450","state":"PUBLISHED","title":"Double free after calling PEM_read_bio_ex","description":"The function PEM_read_bio_ex() reads a PEM file from a BIO and parses and\ndecodes the \"name\" (e.g. \"CERTIFICATE\"), any header data and the payload data.\nIf the function succeeds then the \"name_out\", \"header\" and \"data\" arguments are\npopulated with pointers to buffers containing the relevant decoded data. The\ncaller is responsible for freeing those buffers. It is possible to construct a\nPEM file that results in 0 bytes of payload data. In this case PEM_read_bio_ex()\nwill return a failure code but will populate the header argument with a pointer\nto a buffer that has already been freed. If the caller also frees this buffer\nthen a double free will occur. This will most likely lead to a crash. This\ncould be exploited by an attacker who has the ability to supply malicious PEM\nfiles for parsing to achieve a denial of service attack.\n\nThe functions PEM_read_bio() and PEM_read() are simple wrappers around\nPEM_read_bio_ex() and therefore these functions are also directly affected.\n\nThese functions are also called indirectly by a number of other OpenSSL\nfunctions including PEM_X509_INFO_read_bio_ex() and\nSSL_CTX_use_serverinfo_file() which are also vulnerable. Some OpenSSL internal\nuses of these functions are not vulnerable because the caller does not free the\nheader argument if PEM_read_bio_ex() returns a failure code. These locations\ninclude the PEM_read_bio_TYPE() functions as well as the decoders introduced in\nOpenSSL 3.0.\n\nThe OpenSSL asn1parse command line application is also impacted by this issue.","publishedAt":"2023-02-08T19:04:04.874Z","updatedAt":"2026-10-14T14:39:44.108Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"CISA-ADP"},"assigner":"openssl","products":["OpenSSL OpenSSL"],"affected":[{"vendor":"OpenSSL","product":"OpenSSL","defaultStatus":"unaffected","versions":[{"version":"3.0.0","status":"affected","lessThan":"3.0.8","versionType":"semver"},{"version":"1.1.1","status":"affected","lessThan":"1.1.1t","versionType":"custom"}]}],"references":["https://www.openssl.org/news/secadv/20230207.txt","https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=63bcf189be73a9cc1264059bed6f57974be74a83","https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=bbcf509bd046b34cca19c766bbddc31683d0858b","https://security.gentoo.org/glsa/202402-08","https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2023-0003","https://cert-portal.siemens.com/productcert/html/ssa-203374.html","https://cert-portal.siemens.com/productcert/html/ssa-794697.html","https://cert-portal.siemens.com/productcert/html/ssa-561322.html","https://cert-portal.siemens.com/productcert/html/ssa-699386.html","https://cert-portal.siemens.com/productcert/html/ssa-398330.html","https://cert-portal.siemens.com/productcert/html/ssa-943925.html","https://cert-portal.siemens.com/productcert/html/ssa-556635.html","https://cert-portal.siemens.com/productcert/html/ssa-879734.html","https://cert-portal.siemens.com/productcert/html/ssa-625862.html","https://cert-portal.siemens.com/productcert/html/ssa-337522.html","https://cert-portal.siemens.com/productcert/html/ssa-769027.html"],"weaknesses":["CWE-415"],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/4xxx/CVE-2022-4450.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-4450","state":"PUBLISHED","datePublished":"2023-02-08T19:04:04.874Z","dateUpdated":"2026-10-14T14:39:44.108Z","assignerShortName":"openssl","assignerOrgId":"3a12439a-ef3a-4c79-92e6-6081a721f1e5","dateReserved":"2022-12-13T13:38:08.598Z"},"containers":{"cna":{"title":"Double free after calling PEM_read_bio_ex","descriptions":[{"lang":"en","value":"The function PEM_read_bio_ex() reads a PEM file from a BIO and parses and\ndecodes the \"name\" (e.g. \"CERTIFICATE\"), any header data and the payload data.\nIf the function succeeds then the \"name_out\", \"header\" and \"data\" arguments are\npopulated with pointers to buffers containing the relevant decoded data. The\ncaller is responsible for freeing those buffers. It is possible to construct a\nPEM file that results in 0 bytes of payload data. In this case PEM_read_bio_ex()\nwill return a failure code but will populate the header argument with a pointer\nto a buffer that has already been freed. If the caller also frees this buffer\nthen a double free will occur. This will most likely lead to a crash. This\ncould be exploited by an attacker who has the ability to supply malicious PEM\nfiles for parsing to achieve a denial of service attack.\n\nThe functions PEM_read_bio() and PEM_read() are simple wrappers around\nPEM_read_bio_ex() and therefore these functions are also directly affected.\n\nThese functions are also called indirectly by a number of other OpenSSL\nfunctions including PEM_X509_INFO_read_bio_ex() and\nSSL_CTX_use_serverinfo_file() which are also vulnerable. Some OpenSSL internal\nuses of these functions are not vulnerable because the caller does not free the\nheader argument if PEM_read_bio_ex() returns a failure code. These locations\ninclude the PEM_read_bio_TYPE() functions as well as the decoders introduced in\nOpenSSL 3.0.\n\nThe OpenSSL asn1parse command line application is also impacted by this issue."}],"affected":[{"vendor":"OpenSSL","product":"OpenSSL","defaultStatus":"unaffected","versions":[{"version":"3.0.0","status":"affected","lessThan":"3.0.8","versionType":"semver"},{"version":"1.1.1","status":"affected","lessThan":"1.1.1t","versionType":"custom"}]}],"references":[{"url":"https://www.openssl.org/news/secadv/20230207.txt","name":"OpenSSL Advisory","tags":["vendor-advisory"]},{"url":"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=63bcf189be73a9cc1264059bed6f57974be74a83","name":"3.0.8 git commit","tags":["patch"]},{"url":"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=bbcf509bd046b34cca19c766bbddc31683d0858b","name":"1.1.1t git commit","tags":["patch"]},{"url":"https://security.gentoo.org/glsa/202402-08"}],"metrics":[{"format":"other","other":{"content":{"text":"Moderate"},"type":"https://www.openssl.org/policies/secpolicy.html"}}],"problemTypes":[{"descriptions":[{"description":"double-free","lang":"en"}]}],"providerMetadata":{"shortName":"openssl","orgId":"3a12439a-ef3a-4c79-92e6-6081a721f1e5","dateUpdated":"2024-02-04T09:06:50.535Z"},"credits":[{"lang":"en","type":"finder","user":"00000000-0000-4000-9000-000000000000","value":"CarpetFuzz"},{"lang":"en","type":"reporter","user":"00000000-0000-4000-9000-000000000000","value":"Dawei Wang"},{"lang":"en","type":"reporter","user":"00000000-0000-4000-9000-000000000000","value":"Marc Schönefeld"},{"lang":"en","type":"remediation developer","user":"00000000-0000-4000-9000-000000000000","value":"Kurt Roeckx"},{"lang":"en","type":"remediation developer","user":"00000000-0000-4000-9000-000000000000","value":"Matt Caswell"}],"datePublic":"2023-02-07T00:00:00.000Z","source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 0.1.0-dev"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://www.openssl.org/news/secadv/20230207.txt","name":"OpenSSL Advisory","tags":["vendor-advisory","x_transferred"]},{"url":"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=63bcf189be73a9cc1264059bed6f57974be74a83","name":"3.0.8 git commit","tags":["patch","x_transferred"]},{"url":"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=bbcf509bd046b34cca19c766bbddc31683d0858b","name":"1.1.1t git commit","tags":["patch","x_transferred"]},{"url":"https://security.gentoo.org/glsa/202402-08","tags":["x_transferred"]},{"url":"https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2023-0003"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-04T19:14:13.257Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.5,"attackVector":"NETWORK","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"NONE","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"id":"CVE-2022-4450","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2025-04-23T13:26:38.705489Z"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-415","lang":"en","type":"CWE","description":"CWE-415 Double Free"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-08-27T20:32:52.583Z"}},{"affected":[{"vendor":"Siemens","product":"SCALANCE W1750D (JP)","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"V8.10.0.9","versionType":"custom"}]},{"vendor":"Siemens","product":"SCALANCE W1750D (ROW)","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"V8.10.0.9","versionType":"custom"}]},{"vendor":"Siemens","product":"SCALANCE W1750D (USA)","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"V8.10.0.9","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.0","status":"affected","lessThan":"V3.1.5","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.0","status":"affected","lessThan":"V3.1.5","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.0","status":"affected","lessThan":"V3.1.5","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.0","status":"affected","lessThan":"V3.1.5","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 TM MFP - GNU/Linux subsystem","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"V1.1","versionType":"custom"}]},{"vendor":"Siemens","product":"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.0","status":"affected","lessThan":"V3.1.5","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-203374.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-794697.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-561322.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-699386.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-943925.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-556635.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-879734.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-625862.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-337522.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-769027.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-14T14:39:44.108Z"},"x_adpType":"supplier"}]}}}