{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-4450","id":"CVE-2022-4450","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 th","descriptionLong":"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.","published":"2023-02-08T19:04:04.874Z","updated":"2026-11-18T01:06:29.580719759Z","reserved":"2022-12-13T13:38:08.598Z","status":"Modified","rejected":false,"assigner":"openssl","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"NVD"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"CISA-ADP"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["OpenSSL"],"affectedProducts":[{"vendor":"OpenSSL","product":"OpenSSL","defaultStatus":"unaffected","versions":[{"lessThan":"3.0.8","status":"affected","version":"3.0.0","versionType":"semver"},{"lessThan":"1.1.1t","status":"affected","version":"1.1.1","versionType":"custom"}],"platforms":[]}],"packages":[{"ecosystem":"crates.io","name":"openssl-src","purl":"pkg:cargo/openssl-src","ranges":["<111.25.0",">=300.0.0 <300.0.12",">=0.0.0-0 <111.25.0"],"fixed":["111.25.0","300.0.12"],"advisory":"GHSA-v5w6-wcm8-jm4q"}],"cwes":["CWE-415"],"aliases":["GHSA-v5w6-wcm8-jm4q","RUSTSEC-2023-0010"],"references":[{"url":"https://www.openssl.org/news/secadv/20230207.txt","tags":["vendor-advisory","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=63bcf189be73a9cc1264059bed6f57974be74a83","tags":["patch","x_transferred","Patch","Vendor Advisory","fix","web"]},{"url":"https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=bbcf509bd046b34cca19c766bbddc31683d0858b","tags":["patch","x_transferred","Patch","Vendor Advisory","fix","web"]},{"url":"https://security.gentoo.org/glsa/202402-08","tags":["x_transferred","advisory","web"]},{"url":"https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2023-0003","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-203374.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-794697.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-561322.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-699386.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-943925.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-556635.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-879734.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-625862.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-337522.html","tags":["web"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-769027.html","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/4xxx/CVE-2022-4450.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-4450","tags":["advisory"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2023-0010.html","tags":["web","advisory"]},{"url":"https://crates.io/crates/openssl-src","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial"},"epss":0.2859,"epssPercentile":0.98174,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-4450","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-4450","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-4450","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-v5w6-wcm8-jm4q","ok":true,"note":"GHSA-v5w6-wcm8-jm4q"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-4450","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":["openssl"],"critical":["EPSS 29% with CVSS 7.5"],"attention":null}