Miggo Logo

CVE-2024-0727: Null pointer dereference in PKCS12 parsing

5.5

CVSS Score
3.1

Basic Information

EPSS Score
0.55497%
Published
1/26/2024
Updated
10/14/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
cryptographypip< 42.0.242.0.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability CVE-2024-0727 is a null pointer dereference in OpenSSL's PKCS12 parsing logic. The OpenSSL functions PKCS12_parse(), PKCS12_unpack_p7data(), PKCS12_unpack_p7encdata(), PKCS12_unpack_authsafes(), and PKCS12_newpass() were identified as vulnerable. The cryptography library, which uses OpenSSL for cryptographic operations, is affected if it uses an unpatched version of OpenSSL. The commit 3519591d255d4506fbcd0d04037d45271903c64d for cryptography shows an update to the OpenSSL versions used in its CI environment, indicating that cryptography itself relies on a patched OpenSSL to mitigate this vulnerability rather than changing its own Python code. Therefore, the vulnerable functions within cryptography are those Python functions that serve as wrappers or utilize these underlying vulnerable OpenSSL C APIs for PKCS12 processing. The functions cryptography.hazmat.primitives.serialization.pkcs12.load_key_and_certificates and cryptography.hazmat.primitives.serialization.pkcs12.load_pkcs12 are the primary interfaces in cryptography for handling PKCS12 files and would thus be the entry points for triggering the vulnerability when used with an affected OpenSSL version. The crash would occur in the OpenSSL C code, but these Python functions would be present in the call stack leading to the crash.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

Issu* summ*ry: Pro**ssin* * m*li*iously *orm*tt** PK*S** *il* m*y l*** Op*nSSL to *r*s* l***in* to * pot*nti*l **ni*l o* S*rvi** *tt**k Imp**t summ*ry: *ppli**tions lo**in* *il*s in t** PK*S** *orm*t *rom untrust** sour**s mi**t t*rmin*t* **ruptly.

Reasoning

T** vuln*r**ility *V*-****-**** is * null point*r **r***r*n** in Op*nSSL's PK*S** p*rsin* lo*i*. T** Op*nSSL *un*tions `PK*S**_p*rs*()`, `PK*S**_unp**k_p***t*()`, `PK*S**_unp**k_p**n***t*()`, `PK*S**_unp**k_*ut*s***s()`, *n* `PK*S**_n*wp*ss()` w*r* i