CVE-2022-4450

Double free after calling PEM_read_bio_ex

The function PEM_read_bio_ex() reads a PEM file from a BIO and parses and decodes the "name" (e.g. "CERTIFICATE"), any header data and the payload data. If the function succeeds then the "name_out", "header" and "data" arguments are populated with pointers to buffers containing the relevant decoded data. The caller is responsible for freeing those buffers. It is possible to construct a PEM file that results in 0 bytes of payload data. In this case PEM_read_bio_ex() will return a failure code but will populate the header argument with a pointer to a buffer that has already been freed. If the caller also frees this buffer then a double free will occur. This will most likely lead to a crash. This could be exploited by an attacker who has the ability to supply malicious PEM files for parsing to achieve a denial of service attack. The functions PEM_read_bio() and PEM_read() are simple wrappers around PEM_read_bio_ex() and therefore these functions are also directly affected. These functions are also called indirectly by a number of other OpenSSL functions including PEM_X509_INFO_read_bio_ex() and SSL_CTX_use_serverinfo_file() which are also vulnerable. Some OpenSSL internal uses of these functions are not vulnerable because the caller does not free the header argument if PEM_read_bio_ex() returns a failure code. These locations include the PEM_read_bio_TYPE() functions as well as the decoders introduced in OpenSSL 3.0. The OpenSSL asn1parse command line application is also impacted by this issue.


We have discovered 16,092 live websites that are affected by CVE-2022-4450.

Test my site




Affected Software

Product  OpenSSL
Category Web Server Extensions
Vulnerable Domains16,092 live websites (2.40% of OpenSSL install base)
Vulnerable Versions
  • from 3 before 3.0.8
Vulnerable Versions Count7 versions ( 17.50% of all versions)



Details

  • Published - Feb 8, 2023
  • Updated - Feb 13, 2025

Credits

  • CarpetFuzz (finder)
  • Dawei Wang (reporter)
  • Marc Schönefeld (reporter)
  • Kurt Roeckx (remediation developer)
  • Matt Caswell (remediation developer)

CVE-2022-4450 usage by Country

United States3,623 websites



France2,345 websites
Germany1,486 websites
Japan1,317 websites
Canada848 websites
GB774 websites
Finland688 websites
Netherlands523 websites
Italy404 websites
Hungary397 websites

CVE-2022-4450 usage by TLD

.com5,684 websites
.org685 websites
.edu652 websites
.net643 websites
.ca638 websites
.fi534 websites
.jp534 websites
.fr489 websites
.de439 websites
.co.uk422 websites

Vulnerable Versions

Vulnerable versions are highlighted in red

Websites affected by CVE-2022-4450

Top websites that are affected by CVE-2022-4450. Please click on the "Contact us" link to get more information.
DomainCountryRankContacts
*******.com United States*,***
***.edu United States**,***
******.org Singapore**,***
********.org France**,***
********.com United States**,***
*******.net Japan**,***
******.****.edu United States**,***
************************.com United States**,***
***.com United States**,***
******.com United States**,***
See full domain list

FAQ

A total of 16,092 websites have been identified as vulnerable to CVE-2022-4450, discovered through global website indexing conducted by WebTechSurvey.
OpenSSL is susceptible to CVE-2022-4450 vulnerability.
OpenSSL versions before 3.0.8 are vulnerable to CVE-2022-4450.
Version 3.0.8 of OpenSSL addresses the CVE-2022-4450 security vulnerability.