CVEfocus › CVE database › CVE-2022-4450

CVE-2022-4450Double free after calling PEM_read_bio_ex

CVSS 7.5 HighEPSS 2.9% (higher than 88% of CVEs)Published 2023-02-08Updated 2026-10-14Assigner: openssl

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.

CWE-415

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu, crates.io: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

56Fixed
5Fix pending
1Will not fix
27Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04edk2Not affected
vulnerable_code_not_present
Ubuntu 26.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 25.10edk2Not affected
vulnerable_code_not_present
Ubuntu 25.10nodejsNot affected
vulnerable_code_not_present
Ubuntu 24.04edk2Not affected
vulnerable_code_not_present
Ubuntu 24.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 22.04edk2Fixed2022.02-3ubuntu0.22.04.4UBUNTU-CVE-2022-4450
Ubuntu 22.04nodejsFixed12.22.9~dfsg-1ubuntu3.3UBUNTU-CVE-2022-4450
Ubuntu 22.04opensslFixed3.0.2-0ubuntu1.8UBUNTU-CVE-2022-4450
Ubuntu 20.04edk2Fix pendingUBUNTU-CVE-2022-4450
Ubuntu 20.04opensslFixed1.1.1f-1ubuntu2.17UBUNTU-CVE-2022-4450
Ubuntu 18.04edk2Fix pendingUBUNTU-CVE-2022-4450
Ubuntu 18.04opensslFixed1.1.1-1ubuntu2.1~18.04.21UBUNTU-CVE-2022-4450
Ubuntu 16.04edk2Fix pendingUBUNTU-CVE-2022-4450
Ubuntu 16.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 16.04opensslFix pending
Ubuntu 14.04edk2Fix pending
Debian 14opensslFixed3.0.8-1DEBIAN-CVE-2022-4450
Debian 13opensslFixed3.0.8-1DEBIAN-CVE-2022-4450
Debian 12opensslFixed3.0.8-1DEBIAN-CVE-2022-4450
Red Hat Enterprise Linux 9compat-openssl11Will not fix
Will not fix
Red Hat Enterprise Linux 9edk2Fixed0:20221207gitfff6d81270b5-9.el9_2RHSA-2023:2165
Red Hat Enterprise Linux 9edk2-aarch64Fixed0:20221207gitfff6d81270b5-9.el9_2RHSA-2023:2165
Red Hat Enterprise Linux 9edk2-ovmfFixed0:20221207gitfff6d81270b5-9.el9_2RHSA-2023:2165
Red Hat Enterprise Linux 9edk2-toolsFixed0:20221207gitfff6d81270b5-9.el9_2RHSA-2023:2165
Red Hat Enterprise Linux 9edk2-tools-docFixed0:20221207gitfff6d81270b5-9.el9_2RHSA-2023:2165
Red Hat Enterprise Linux 9opensslFixed1:3.0.1-47.el9_1RHSA-2023:0946
Red Hat Enterprise Linux 9openssl-develFixed1:3.0.1-47.el9_1RHSA-2023:0946
Red Hat Enterprise Linux 9openssl-libsFixed1:3.0.1-47.el9_1RHSA-2023:0946
Red Hat Enterprise Linux 9openssl-perlFixed1:3.0.1-47.el9_1RHSA-2023:0946
Red Hat Enterprise Linux 9shimNot affected
Red Hat Enterprise Linux 9shim-aa64Not affected
Red Hat Enterprise Linux 9shim-x64Not affected
Red Hat Enterprise Linux 8compat-openssl10Not affected
Red Hat Enterprise Linux 8edk2Fixed0:20220126gitbb1bba3d77-4.el8RHSA-2023:2932
Red Hat Enterprise Linux 8edk2-aarch64Fixed0:20220126gitbb1bba3d77-4.el8RHSA-2023:2932
Red Hat Enterprise Linux 8edk2-ovmfFixed0:20220126gitbb1bba3d77-4.el8RHSA-2023:2932
Red Hat Enterprise Linux 8opensslFixed1:1.1.1k-9.el8_7RHSA-2023:1405
Red Hat Enterprise Linux 8openssl-develFixed1:1.1.1k-9.el8_7RHSA-2023:1405
Red Hat Enterprise Linux 8openssl-libsFixed1:1.1.1k-9.el8_7RHSA-2023:1405
Red Hat Enterprise Linux 8openssl-perlFixed1:1.1.1k-9.el8_7RHSA-2023:1405
Red Hat Enterprise Linux 8shimNot affected
Red Hat Enterprise Linux 8shim-aa64Not affected
Red Hat Enterprise Linux 8shim-ia32Not affected
Red Hat Enterprise Linux 8shim-x64Not affected
Red Hat Enterprise Linux 7AAVMFNot affected
Red Hat Enterprise Linux 7OVMFNot affected
Red Hat Enterprise Linux 7opensslNot affected
Red Hat Enterprise Linux 7openssl-develNot affected
Red Hat Enterprise Linux 7openssl-libsNot affected
Red Hat Enterprise Linux 7openssl-perlNot affected
Red Hat Enterprise Linux 7openssl-staticNot affected
Red Hat Enterprise Linux 7ovmfNot affected
Red Hat Enterprise Linux 6opensslNot affected
Red Hat Enterprise Linux 6openssl-develNot affected
Red Hat Enterprise Linux 6openssl-perlNot affected
Red Hat Enterprise Linux 6openssl-staticNot affected
AlmaLinux 9edk2-aarch64Fixed20221207gitfff6d81270b5-9.el9_2ALSA-2023:2165
AlmaLinux 9edk2-ovmfFixed20221207gitfff6d81270b5-9.el9_2ALSA-2023:2165
AlmaLinux 9edk2-toolsFixed20221207gitfff6d81270b5-9.el9_2ALSA-2023:2165
AlmaLinux 9edk2-tools-docFixed20221207gitfff6d81270b5-9.el9_2ALSA-2023:2165
AlmaLinux 9opensslFixed1:3.0.1-47.el9_1ALSA-2023:0946
AlmaLinux 9openssl-develFixed1:3.0.1-47.el9_1ALSA-2023:0946
AlmaLinux 9openssl-libsFixed1:3.0.1-47.el9_1ALSA-2023:0946
AlmaLinux 9openssl-perlFixed1:3.0.1-47.el9_1ALSA-2023:0946
AlmaLinux 8edk2-aarch64Fixed20220126gitbb1bba3d77-4.el8ALSA-2023:2932
AlmaLinux 8edk2-ovmfFixed20220126gitbb1bba3d77-4.el8ALSA-2023:2932
AlmaLinux 8opensslFixed1:1.1.1k-9.el8_7ALSA-2023:1405
AlmaLinux 8openssl-develFixed1:1.1.1k-9.el8_7ALSA-2023:1405
AlmaLinux 8openssl-libsFixed1:1.1.1k-9.el8_7ALSA-2023:1405
AlmaLinux 8openssl-perlFixed1:1.1.1k-9.el8_7ALSA-2023:1405
Rocky Linux 9opensslFixed1:3.0.1-47.el9_1RLSA-2023:0946
Rocky Linux 8opensslFixed1:1.1.1k-9.el8_7RLSA-2023:1405
Alpine Linux 3.24opensslFixed3.0.8-r0ALPINE-CVE-2022-4450
Alpine Linux 3.23opensslFixed3.0.8-r0ALPINE-CVE-2022-4450
Alpine Linux 3.22opensslFixed3.0.8-r0ALPINE-CVE-2022-4450
Alpine Linux 3.21opensslFixed3.0.8-r0ALPINE-CVE-2022-4450
Alpine Linux 3.20opensslFixed3.0.8-r0ALPINE-CVE-2022-4450
Alpine Linux 3.19opensslFixed3.0.8-r0ALPINE-CVE-2022-4450
Alpine Linux 3.18opensslFixed3.0.8-r0ALPINE-CVE-2022-4450
Alpine Linux 3.18openssl1.1-compatFixed1.1.1t-r0ALPINE-CVE-2022-4450
Alpine Linux 3.17opensslFixed3.0.8-r0ALPINE-CVE-2022-4450
Alpine Linux 3.17openssl1.1-compatFixed1.1.1t-r0ALPINE-CVE-2022-4450
Alpine Linux 3.16opensslFixed1.1.1t-r0ALPINE-CVE-2022-4450
Alpine Linux 3.16openssl3Fixed3.0.8-r0ALPINE-CVE-2022-4450
Alpine Linux 3.15opensslFixed1.1.1t-r0ALPINE-CVE-2022-4450
Alpine Linux 3.15openssl3Fixed3.0.8-r0ALPINE-CVE-2022-4450
Alpine Linux 3.14opensslFixed1.1.1t-r0ALPINE-CVE-2022-4450
crates.io libraryopenssl-srcFixed300.0.12GHSA-v5w6-wcm8-jm4q

What the vendor says

As published in the CVE record by openssl, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.