CVE-2024-26130 in Cryptography.Io Cryptography
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_algor...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, no confidentiality impact, no integrity impact, full availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Cryptography.Io | Cryptography | ≥ 38.0.0, < 42.0.4 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official 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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2024-26130 |
|---|---|
| BreachSpider ID | BS-2024-GLOBAL-051913-H |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| Published | 2024-02-21 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-476: NULL Pointer Dereference
Software attempts to use a NULL pointer, causing a crash and denial of service.
Analysis AI-written, not human-reviewed
CVE-2024-26130 affects the cryptography package in Python, specifically versions 38.0.0 to 42.0.3, where the function `pkcs12.serialize_key_and_certificates` can be exploited if a certificate's public key does not match the provided private key and an encryption algorithm with `hmac_hash` is set.
An attacker could exploit this vulnerability by providing a mismatched certificate and private key pair along with an encryption algorithm that uses `hmac_hash`. This could lead to potential cryptographic material leakage or other security issues.
Questions
What is CVE-2024-26130?
CVE-2024-26130 affects the cryptography package in Python, specifically versions 38.0.0 to 42.0.3, where the function `pkcs12.serialize_key_and_certificates` can be exploited if a certificate's public key does not match the provided private key and an encryption algorithm with `hmac_hash` is set.
What is the CVSS score for CVE-2024-26130?
CVE-2024-26130 has CVSS 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. EPSS: 1.7%.
Is CVE-2024-26130 actively exploited?
No confirmed active exploitation of CVE-2024-26130 as of 2026-09-25.
How do I remediate CVE-2024-26130?
Priority: HIGH. PSIRT: [email protected]
What systems are affected by CVE-2024-26130?
CVE-2024-26130 affects Cryptography.Io Cryptography.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Cryptography.Io","product":"Cryptography","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.