CVE-2024-26130: cryptography NULL pointer deference with pkcs12.serialize_key_and_certificates when called with a non-matching certificate and private key and an hmac_hash override
Vulnerability summary
CVE-2024-26130 is a high (CVSS 7.5) NULL Pointer Dereference vulnerability in cryptography.io cryptography. EPSS estimates a 0.83% chance of exploitation in the next 30 days, higher than 57.6% of scored vulnerabilities.
Severe, CVSS 7.5 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 03-11-2026)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 6 · Related 9Timeline
- 21-02-2024PublishedVulnerability first disclosed.
- 14-08-2024Last modifiedVulnerability information updated.
Description
cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Starting in version 38.0.0 and prior to version 42.0.4, if `pkcs12.serialize_key_and_certificates` is called with both a certificate whose public key did not match the provided private key and an `encryption_algorithm` with `hmac_hash` set (via `PrivateFormat.PKCS12.encryption_builder().hmac_hash(...)`, then a NULL pointer dereference would occur, crashing the Python process. This has been resolved in version 42.0.4, the first version in which a `ValueError` is properly raised.
CVSS metrics
8 scores · 8 sources · 1 version- OSV · PypiEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · Red hatEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · UbuntuEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · WolfiEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · ChainguardEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- NVDNIST7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
0.83%
Chance of exploitation in the next 30 days
Percentile
58%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.83% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard12 products
- airflowAll versions (No fix recorded) | < 2.10.5-r44
- airflow-bitnami-compatAll versions (No fix recorded)
- az< 2.58.0-r0
- az-iamguarded-compat< 2.58.0-r0
- ggshield< 1.25.0-r0
Wolfi10 products
- airflowAll versions (No fix recorded) | < 2.10.5-r44
- airflow-bitnami-compatAll versions (No fix recorded)
- az< 2.58.0-r0
- az-iamguarded-compat< 2.58.0-r0
- ggshield< 1.25.0-r0
Opensuse3 products
- python-cryptography&distro=openSUSE Leap 15.5< 41.0.3-150400.16.15.1
- python-cryptography&distro=openSUSE Leap 15.6< 41.0.3-150600.23.3.1
- python-cryptography&distro=openSUSE Tumbleweed< 42.0.4-1.1
Redhat3 products
- python3.12-cryptography< 0:41.0.7-2.el9_6.1
- python3.12-cryptography-debuginfo< 0:41.0.7-2.el9_6.1
- python3.12-cryptography-debugsource< 0:41.0.7-2.el9_6.1
Suse2 products
- python-cryptography&distro=SUSE Linux Enterprise Module for Python 3 15 SP5< 41.0.3-150400.16.15.1
- python-cryptography&distro=SUSE Linux Enterprise Module for Python 3 15 SP6< 41.0.3-150600.23.3.1
Cryptography.io1 product
- cryptography≥ 38.0.0, < 42.0.4
Debian1 product
- python-cryptography< 38.0.4-3+deb12u1 | < 42.0.5-1
Pyca1 product
- cryptography≥ 38.0.0, < 42.0.4
PyPI1 product
- cryptography< 97d231672763cdb5959a3b191e692a362f1b9e55 | ≥ 38.0.0, < 42.0.4
Ubuntu1 product
- python-cryptography< 41.0.7-4ubuntu0.1
10 vendors · 35 products
References
22 links- github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4X Refsource CONFIRMWEBAdvisoryREPORTVendor Advisory
- github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55X Refsource MISCWEBFIXPatch
- github.com/pyca/cryptographyPACKAGE