Skip to main content

CVE-2024-0727: CWE-476 NULL Pointer Dereference in OpenSSL OpenSSL

Medium
VulnerabilityCVE-2024-0727cvecve-2024-0727cwe-476
Published: Fri Jan 26 2024 (01/26/2024, 08:57:19 UTC)
Source: CVE Database V5
Vendor/Project: OpenSSL
Product: OpenSSL

Description

Issue summary: Processing a maliciously formatted PKCS12 file may lead OpenSSL to crash leading to a potential Denial of Service attack Impact summary: Applications loading files in the PKCS12 format from untrusted sources might terminate abruptly. A file in PKCS12 format can contain certificates and keys and may come from an untrusted source. The PKCS12 specification allows certain fields to be NULL, but OpenSSL does not correctly check for this case. This can lead to a NULL pointer dereference that results in OpenSSL crashing. If an application processes PKCS12 files from an untrusted source using the OpenSSL APIs then that application will be vulnerable to this issue. OpenSSL APIs that are vulnerable to this are: PKCS12_parse(), PKCS12_unpack_p7data(), PKCS12_unpack_p7encdata(), PKCS12_unpack_authsafes() and PKCS12_newpass(). We have also fixed a similar issue in SMIME_write_PKCS7(). However since this function is related to writing data we do not consider it security significant. The FIPS modules in 3.2, 3.1 and 3.0 are not affected by this issue.

AI-Powered Analysis

AILast updated: 07/07/2025, 23:40:23 UTC

Technical Analysis

CVE-2024-0727 is a medium-severity vulnerability in OpenSSL affecting multiple versions including 3.2.0, 3.1.0, 3.0.0, 1.1.1, and 1.0.2. The issue arises from improper handling of PKCS12 files, which are commonly used to bundle certificates and private keys. Specifically, OpenSSL does not correctly check for NULL pointers in certain fields allowed by the PKCS12 specification. When processing a maliciously crafted PKCS12 file containing NULL fields, OpenSSL’s vulnerable APIs (PKCS12_parse(), PKCS12_unpack_p7data(), PKCS12_unpack_p7encdata(), PKCS12_unpack_authsafes(), and PKCS12_newpass()) may dereference a NULL pointer, causing the application to crash. This results in a denial of service (DoS) condition. The vulnerability does not impact confidentiality or integrity but affects availability by causing abrupt termination of applications that load PKCS12 files from untrusted sources. Notably, the FIPS modules in OpenSSL versions 3.0, 3.1, and 3.2 are not affected. Although a similar issue was fixed in SMIME_write_PKCS7(), it is not considered security significant as it relates to data writing rather than parsing. No known exploits are reported in the wild at this time. The vulnerability requires user interaction in the form of loading a malicious PKCS12 file and has a CVSS v3.1 base score of 5.5, reflecting its medium severity. The attack vector is local, requiring the attacker to supply a crafted file to the vulnerable application, which must then process it using the affected OpenSSL APIs.

Potential Impact

For European organizations, the primary impact of CVE-2024-0727 is the potential for denial of service in applications that utilize OpenSSL to parse PKCS12 files from untrusted or external sources. This can disrupt services that rely on certificate management, such as secure communications, VPNs, email encryption, and identity management systems. Organizations handling large volumes of certificates or automating certificate imports are particularly at risk if these processes do not validate input files properly. While the vulnerability does not allow data theft or code execution, the availability impact could lead to operational disruptions, especially in critical infrastructure sectors like finance, healthcare, and government where PKCS12 files are commonly used for secure key storage. The lack of known exploits reduces immediate risk, but the widespread use of OpenSSL in European IT environments means the vulnerability could be leveraged in targeted attacks or cause accidental outages if malicious or malformed files are introduced, intentionally or otherwise.

Mitigation Recommendations

European organizations should implement the following specific mitigations: 1) Immediately update OpenSSL to a patched version once available, or apply vendor patches if using third-party software that bundles OpenSSL. 2) Restrict the sources of PKCS12 files to trusted and verified origins; implement strict input validation and file integrity checks before processing. 3) Employ sandboxing or isolation techniques for applications that parse PKCS12 files to contain potential crashes and prevent broader service disruption. 4) Monitor application logs for crashes or abnormal terminations related to PKCS12 processing to detect exploitation attempts or accidental triggers. 5) For critical systems, consider using the OpenSSL FIPS modules (3.0, 3.1, 3.2) which are not affected by this vulnerability. 6) Educate administrators and users about the risks of loading PKCS12 files from untrusted sources and enforce policies to prevent such practices. 7) If feasible, implement application-level exception handling around OpenSSL PKCS12 parsing calls to gracefully handle errors and maintain service availability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
openssl
Date Reserved
2024-01-19T11:01:11.010Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 68387d4f182aa0cae28316c7

Added to database: 5/29/2025, 3:29:19 PM

Last enriched: 7/7/2025, 11:40:23 PM

Last updated: 8/12/2025, 12:41:20 AM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats