CVEfocus › CVE database › CVE-2023-0215

CVE-2023-0215Use-after-free following BIO_new_NDEF

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

The public API function BIO_new_NDEF is a helper function used for streaming ASN.1 data via a BIO. It is primarily used internally to OpenSSL to support the SMIME, CMS and PKCS7 streaming capabilities, but may also be called directly by end user applications. The function receives a BIO from the caller, prepends a new BIO_f_asn1 filter BIO onto the front of it to form a BIO chain, and then returns the new head of the BIO chain to the caller. Under certain conditions, for example if a CMS recipient public key is invalid, the new filter BIO is freed and the function returns a NULL result indicating a failure. However, in this case, the BIO chain is not properly cleaned up and the BIO passed by the caller still retains internal pointers to the previously freed filter BIO. If the caller then goes on to call BIO_pop() on the BIO then a use-after-free will occur. This will most likely result in a crash. This scenario occurs directly in the internal function B64_write_ASN1() which may cause BIO_new_NDEF() to be called and will subsequently call BIO_pop() on the BIO. This internal function is in turn called by the public API functions PEM_write_bio_ASN1_stream, PEM_write_bio_CMS_stream, PEM_write_bio_PKCS7_stream, SMIME_write_ASN1, SMIME_write_CMS and SMIME_write_PKCS7. Other public API functions that may be impacted by this include i2d_ASN1_bio_stream, BIO_new_CMS, BIO_new_PKCS7, i2d_CMS_bio_stream and i2d_PKCS7_bio_stream. The OpenSSL cms and smime command line applications are similarly affected.

CWE-416

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

57Fixed
6Fix pending
17Will not fix
11Not 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-2023-0215
Ubuntu 22.04nodejsFixed12.22.9~dfsg-1ubuntu3.3UBUNTU-CVE-2023-0215
Ubuntu 22.04opensslFixed3.0.2-0ubuntu1.8UBUNTU-CVE-2023-0215
Ubuntu 20.04edk2Fix pendingUBUNTU-CVE-2023-0215
Ubuntu 20.04opensslFixed1.1.1f-1ubuntu2.17UBUNTU-CVE-2023-0215
Ubuntu 18.04edk2Fix pendingUBUNTU-CVE-2023-0215
Ubuntu 18.04opensslFixed1.1.1-1ubuntu2.1~18.04.21UBUNTU-CVE-2023-0215
Ubuntu 18.04openssl1.0Fixed1.0.2n-1ubuntu5.11UBUNTU-CVE-2023-0215
Ubuntu 16.04edk2Fix pendingUBUNTU-CVE-2023-0215
Ubuntu 16.04nodejsNot affected
vulnerable_code_not_present
Ubuntu 16.04opensslFix pending1.0.2g-1ubuntu4.20+esm6 (Ubuntu Pro)UBUNTU-CVE-2023-0215
Ubuntu 14.04edk2Fix pending
Ubuntu 14.04opensslFix pending1.0.1f-1ubuntu2.27+esm6 (Ubuntu Pro)UBUNTU-CVE-2023-0215
Debian 14opensslFixed3.0.8-1DEBIAN-CVE-2023-0215
Debian 13opensslFixed3.0.8-1DEBIAN-CVE-2023-0215
Debian 12opensslFixed3.0.8-1DEBIAN-CVE-2023-0215
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 9shimWill not fix
Will not fix
Red Hat Enterprise Linux 9shim-aa64Will not fix
Will not fix
Red Hat Enterprise Linux 9shim-x64Will not fix
Will not fix
Red Hat Enterprise Linux 8compat-openssl10Will not fix
Will not fix
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 7AAVMFWill not fix
Out of support scope
Red Hat Enterprise Linux 7OVMFWill not fix
Out of support scope
Red Hat Enterprise Linux 7opensslWill not fix
Out of support scope
Red Hat Enterprise Linux 7openssl-develWill not fix
Out of support scope
Red Hat Enterprise Linux 7openssl-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 7openssl-perlWill not fix
Out of support scope
Red Hat Enterprise Linux 7openssl-staticWill not fix
Out of support scope
Red Hat Enterprise Linux 7ovmfWill not fix
Out of support scope
Red Hat Enterprise Linux 6opensslWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-perlWill not fix
Out of support scope
Red Hat Enterprise Linux 6openssl-staticWill not fix
Out of support scope
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-2023-0215
Alpine Linux 3.23opensslFixed3.0.8-r0ALPINE-CVE-2023-0215
Alpine Linux 3.22opensslFixed3.0.8-r0ALPINE-CVE-2023-0215
Alpine Linux 3.21opensslFixed3.0.8-r0ALPINE-CVE-2023-0215
Alpine Linux 3.20opensslFixed3.0.8-r0ALPINE-CVE-2023-0215
Alpine Linux 3.19opensslFixed3.0.8-r0ALPINE-CVE-2023-0215
Alpine Linux 3.18opensslFixed3.0.8-r0ALPINE-CVE-2023-0215
Alpine Linux 3.18openssl1.1-compatFixed1.1.1t-r0ALPINE-CVE-2023-0215
Alpine Linux 3.17opensslFixed3.0.8-r0ALPINE-CVE-2023-0215
Alpine Linux 3.17openssl1.1-compatFixed1.1.1t-r0ALPINE-CVE-2023-0215
Alpine Linux 3.16opensslFixed1.1.1t-r0ALPINE-CVE-2023-0215
Alpine Linux 3.16openssl3Fixed3.0.8-r0ALPINE-CVE-2023-0215
Alpine Linux 3.15opensslFixed1.1.1t-r0ALPINE-CVE-2023-0215
Alpine Linux 3.15openssl3Fixed3.0.8-r0ALPINE-CVE-2023-0215
Alpine Linux 3.14opensslFixed1.1.1t-r0ALPINE-CVE-2023-0215
crates.io libraryopenssl-srcFixed111.25.0RUSTSEC-2023-0009

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.