VYPR
High severityNVD Advisory· Published Feb 8, 2023· Updated Nov 4, 2025

NULL dereference during PKCS7 data verification

CVE-2023-0401

Description

A NULL pointer can be dereferenced when signatures are being verified on PKCS7 signed or signedAndEnveloped data. In case the hash algorithm used for the signature is known to the OpenSSL library but the implementation of the hash algorithm is not available the digest initialization will fail. There is a missing check for the return value from the initialization function which later leads to invalid usage of the digest API most likely leading to a crash.

The unavailability of an algorithm can be caused by using FIPS enabled configuration of providers or more commonly by not loading the legacy provider.

PKCS7 data is processed by the SMIME library calls and also by the time stamp (TS) library calls. The TLS implementation in OpenSSL does not call these functions however third party applications would be affected if they call these functions to verify signatures on untrusted data.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A NULL pointer dereference in OpenSSL's PKCS7 signature verification can cause a crash when a hash algorithm's implementation is unavailable.

Vulnerability

Overview

CVE-2023-0401 is a NULL pointer dereference vulnerability in OpenSSL's handling of PKCS7 signed or signedAndEnveloped data. When verifying a PKCS7 signature, the library initializes the digest for the hash algorithm specified in the signature. If the hash algorithm's name is recognized but its implementation is not loaded (e.g., due to a FIPS-only configuration or failure to load the legacy provider), the digest initialization function returns an error. However, the code does not check this return value, leading to a subsequent call to the digest API with a NULL pointer, which typically results in a crash [1][2].

Exploitation

An attacker can exploit this by crafting a PKCS7 message that uses a hash algorithm known to OpenSSL but whose implementation is unavailable. The vulnerability is reachable through any application that calls OpenSSL's PKCS7 verification functions, such as those in the SMIME or Time Stamp (TS) libraries. The TLS implementation itself does not use these functions, but third-party applications that verify signatures on untrusted data (e.g., email clients, signature verification tools) are affected. The attack does not require authentication, as the PKCS7 data can be supplied externally [2][3].

Impact

Successful exploitation leads to a denial of service (DoS) via application crash. The vulnerability does not appear to allow arbitrary code execution or memory corruption beyond the immediate crash; the advisory and NVD description only indicate a crash [1][2]. The severity was rated High (CVSS v3.1 7.5) due to the network attack vector and low complexity, though the impact is limited to availability.

Mitigation

OpenSSL 3.0 users should upgrade to version 3.0.8, which includes the fix. For OpenSSL 1.1.1 and 1.0.2, the issue is present but no patch has been released for 1.1.1 (as of this advisory); however, the main advisory only lists fixes for 3.0.8 and 1.1.1t (the latter addresses other issues). Users of the openssl-src Rust crate are patched in version 300.0.12 and later [3][4]. The recommended mitigation is to ensure the legacy provider is loaded when needed, but the safest approach is to apply the vendor patch.

AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
openssl-srccrates.io
>= 300.0.0, < 300.0.12300.0.12

Affected products

43

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

7

News mentions

0

No linked articles in our index yet.