{"id":"CVE-2022-4450","published":"2023-02-08T19:04:04Z","modified":"2026-10-14T14:39:44Z","title":"Double free after calling PEM_read_bio_ex","vendor":"OpenSSL","product":"OpenSSL","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.2859,"percentile":0.9818,"provenance":"source"},"cwes":[{"id":"CWE-415","name":"Double Free"}],"references":[{"url":"https://www.openssl.org/news/secadv/20230207.txt","tags":["vendor-advisory"]},{"url":"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=63bcf189be73a9cc1264059bed6f57974be74a83","tags":["patch"]},{"url":"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=bbcf509bd046b34cca19c766bbddc31683d0858b","tags":["patch"]},{"url":"https://security.gentoo.org/glsa/202402-08","tags":[]},{"url":"https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2023-0003","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-203374.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-794697.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-561322.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-699386.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-943925.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-556635.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-879734.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-625862.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-337522.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-769027.html","tags":[]}],"priority":{"score":24.9,"factors":[{"name":"EPSS percentile","points":19.64},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"openssl","affectedVersions":[{"vendor":"OpenSSL","product":"OpenSSL","versions":[">= 3.0.0, < 3.0.8",">= 1.1.1, < 1.1.1t"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-04-23T13:26:38.705489Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"openssl-src","vulnerableRanges":["<111.25.0",">=300.0.0, <300.0.12",">=0.0.0-0, <111.25.0"],"patched":["111.25.0","300.0.12"],"from":["GHSA-v5w6-wcm8-jm4q","RUSTSEC-2023-0010"],"provenance":"source"}],"summary":{"text":"A double free in OpenSSL's PEM_read_bio_ex() function, which parses PEM files and is also reached through PEM_read_bio(), PEM_read(), PEM_X509_INFO_read_bio_ex(), SSL_CTX_use_serverinfo_file() and the asn1parse command-line application. An attacker who can supply a malicious PEM file for parsing can trigger the flaw over the network without authentication or user interaction, causing a denial of service, most likely a crash.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:35:49Z"},"euvd":{"id":"EUVD-2023-0796","exploited":false,"provenance":"source"}}