{"cve":"CVE-2023-0215","nvd":{"published":"2023-02-08T20:15:24.107","modified":"2026-10-14T19:16:57.987","status":"Modified","description":"The public API function BIO_new_NDEF is a helper function used for streaming\nASN.1 data via a BIO. It is primarily used internally to OpenSSL to support the\nSMIME, CMS and PKCS7 streaming capabilities, but may also be called directly by\nend user applications.\n\nThe function receives a BIO from the caller, prepends a new BIO_f_asn1 filter\nBIO onto the front of it to form a BIO chain, and then returns the new head of\nthe BIO chain to the caller. Under certain conditions, for example if a CMS\nrecipient public key is invalid, the new filter BIO is freed and the function\nreturns a NULL result indicating a failure. However, in this case, the BIO chain\nis not properly cleaned up and the BIO passed by the caller still retains\ninternal pointers to the previously freed filter BIO. If the caller then goes on\nto call BIO_pop() on the BIO then a use-after-free will occur. This will most\nlikely result in a crash.\n\n\n\nThis scenario occurs directly in the internal function B64_write_ASN1() which\nmay cause BIO_new_NDEF() to be called and will subsequently call BIO_pop() on\nthe BIO. This internal function is in turn called by the public API functions\nPEM_write_bio_ASN1_stream, PEM_write_bio_CMS_stream, PEM_write_bio_PKCS7_stream,\nSMIME_write_ASN1, SMIME_write_CMS and SMIME_write_PKCS7.\n\nOther public API functions that may be impacted by this include\ni2d_ASN1_bio_stream, BIO_new_CMS, BIO_new_PKCS7, i2d_CMS_bio_stream and\ni2d_PKCS7_bio_stream.\n\nThe OpenSSL cms and smime command line applications are similarly affected.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-416"],"references":["https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=8818064ce3c3c0f1b740a5aaba2a987e75bfbafd","https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=9816136fe31d92ace4037d5da5257f763aeeb4eb","https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=c3829dd8825c654652201e16f8a0a0c46ee3f344","https://security.gentoo.org/glsa/202402-08","https://security.netapp.com/advisory/ntap-20230427-0007/"],"products":["openssl:openssl","stormshield:stormshield_management_center"],"source":"nvd","synced_at":"2026-10-19T21:37:38.595364862+00:00"},"epss":{"cve":"CVE-2023-0215","score":0.05024,"percentile":0.92201,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-r7jw-wp68-3xch","url":"https://osv.dev/vulnerability/GHSA-r7jw-wp68-3xch","summary":"openssl-src vulnerable to Use-after-free following `BIO_new_NDEF`","modified":"2026-09-10T03:49:52.104663271Z","packages":[{"ecosystem":"crates.io","name":"openssl-src","purl":"pkg:cargo/openssl-src","ranges":["<111.25.0"],"fixed":["111.25.0"]},{"ecosystem":"crates.io","name":"openssl-src","purl":"pkg:cargo/openssl-src","ranges":[">=300.0.0 <300.0.12"],"fixed":["300.0.12"]}]},{"id":"RUSTSEC-2023-0009","url":"https://osv.dev/vulnerability/RUSTSEC-2023-0009","summary":"Use-after-free following `BIO_new_NDEF`","modified":"2023-11-08T04:11:06.259401Z","packages":[{"ecosystem":"crates.io","name":"openssl-src","purl":"pkg:cargo/openssl-src","ranges":[">=0.0.0-0 <111.25.0",">=300.0.0 <300.0.12"],"fixed":["111.25.0","300.0.12"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}