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
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.
Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.
Severity and exploitation evidence
EPSS: 0.831% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.
CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T17:59:58.648Z. Public exploit availability is not used to set this status.
CVSS 3.1 · 7.5 · published by GitHub_MCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Assessment source · checked 2026-11-19T12:57:08.204Z
Verification by field
| Field | Status | Checked at (UTC) | Source |
|---|---|---|---|
| kev | verified | 2026-11-19T17:59:58.648Z | CISA KEV |
| cvss | verified | 2026-11-19T12:57:08.204Z | CVE Program |
| epss | verified | 2026-11-19T18:27:10.600Z | FIRST EPSS |
| patches | verified | 2026-11-19T12:52:02.630Z | OSV |
| affected | verified | 2026-11-19T12:57:08.204Z | CVE Program |
| lifecycle | verified | 2026-11-19T12:57:08.204Z | CVE Program |
Affected versions and configuration
pyca cryptography; default status: unknown: >= 38.0.0, < 42.0.4 [affected; scheme: unspecified]
Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.
CVE Program · cve-json · full conditions
{
"affected": [
{
"vendor": "pyca",
"product": "cryptography",
"versions": [
{
"status": "affected",
"version": ">= 38.0.0, < 42.0.4"
}
]
}
],
"additionalContainers": [
{
"title": "CVE Program Container",
"references": [
{
"url": "https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4",
"name": "https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4",
"tags": [
"x_refsource_CONFIRM",
"x_transferred"
]
},
{
"url": "https://github.com/pyca/cryptography/pull/10423",
"name": "https://github.com/pyca/cryptography/pull/10423",
"tags": [
"x_refsource_MISC",
"x_transferred"
]
},
{
"url": "https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55",
"name": "https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55",
"tags": [
"x_refsource_MISC",
"x_transferred"
]
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2024-08-01T23:59:32.542Z"
}
},
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2024-26130",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "yes"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2024-08-14T19:56:07.150963Z"
}
}
}
],
"affected": [
{
"cpes": [
"cpe:2.3:a:cryptography_project:cryptography:*:*:*:*:*:python:*:*"
],
"vendor": "cryptography_project",
"product": "cryptography",
"versions": [
{
"status": "affected",
"version": "38.0.0",
"lessThan": "42.04",
"versionType": "custom"
}
],
"defaultStatus": "unknown"
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2024-08-14T20:01:52.628Z"
}
}
]
}Archived source JSONOSV · osv · full conditions
{
"id": "GHSA-6vqw-3v5j-54x4",
"aliases": [
"CVE-2024-26130",
"PYSEC-2024-225"
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "38.0.0"
},
{
"fixed": "42.0.4"
}
]
}
],
"package": {
"name": "cryptography",
"purl": "pkg:pypi/cryptography",
"ecosystem": "PyPI"
},
"versions": [
"38.0.0",
"38.0.1",
"38.0.2",
"38.0.3",
"38.0.4",
"39.0.0",
"39.0.1",
"39.0.2",
"40.0.0",
"40.0.1",
"40.0.2",
"41.0.0",
"41.0.1",
"41.0.2",
"41.0.3",
"41.0.4",
"41.0.5",
"41.0.6",
"41.0.7",
"42.0.0",
"42.0.1",
"42.0.2",
"42.0.3"
],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/02/GHSA-6vqw-3v5j-54x4/GHSA-6vqw-3v5j-54x4.json"
}
}
],
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4",
"type": "WEB"
},
{
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-26130",
"type": "ADVISORY"
},
{
"url": "https://github.com/pyca/cryptography/pull/10423",
"type": "WEB"
},
{
"url": "https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55",
"type": "WEB"
},
{
"url": "https://github.com/pyca/cryptography",
"type": "PACKAGE"
},
{
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/cryptography/PYSEC-2024-225.yaml",
"type": "WEB"
}
],
"relatedGitRanges": [],
"database_specific": {
"cwe_ids": [
"CWE-476"
],
"severity": "HIGH",
"github_reviewed": true,
"nvd_published_at": "2024-02-21T17:15:09Z",
"github_reviewed_at": "2024-02-21T18:04:40Z"
}
}Archived source JSONOSV · osv · full conditions
{
"id": "PYSEC-2024-225",
"aliases": [
"CVE-2024-26130",
"GHSA-6vqw-3v5j-54x4"
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/pyca/cryptography",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "97d231672763cdb5959a3b191e692a362f1b9e55"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "38.0.0"
},
{
"fixed": "42.0.4"
}
]
}
],
"package": {
"name": "cryptography",
"purl": "pkg:pypi/cryptography",
"ecosystem": "PyPI"
},
"versions": [
"38.0.0",
"38.0.1",
"38.0.2",
"38.0.3",
"38.0.4",
"39.0.0",
"39.0.1",
"39.0.2",
"40.0.0",
"40.0.1",
"40.0.2",
"41.0.0",
"41.0.1",
"41.0.2",
"41.0.3",
"41.0.4",
"41.0.5",
"41.0.6",
"41.0.7",
"42.0.0",
"42.0.1",
"42.0.2",
"42.0.3",
"37.0.0",
"36.0.0",
"35.0.0",
"3.4",
"3.3",
"3.2",
"3.1",
"3.0",
"2.9",
"2.8",
"2.7",
"2.6.1",
"2.6",
"2.5",
"2.4.1",
"2.4",
"2.3",
"2.2",
"2.1",
"2.0",
"1.9",
"1.8",
"1.7",
"1.6",
"1.5",
"1.4",
"1.3",
"1.2",
"1.1",
"1.0",
"0.9",
"0.8",
"0.7",
"0.6",
"0.5.1",
"0.5",
"0.4",
"0.3",
"0.2",
"0.1"
],
"database_specific": {
"source": "https://github.com/pypa/advisory-database/blob/main/vulns/cryptography/PYSEC-2024-225.yaml"
}
}
],
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4",
"type": "ADVISORY"
},
{
"url": "https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55",
"type": "FIX"
},
{
"url": "https://github.com/pyca/cryptography/pull/10423",
"type": "FIX"
},
{
"url": "https://github.com/pyca/cryptography/pull/10423",
"type": "REPORT"
},
{
"url": "https://github.com/advisories/GHSA-6vqw-3v5j-54x4",
"type": "ADVISORY"
}
],
"relatedGitRanges": [],
"database_specific": {}
}Archived source JSONCorrection evidence
Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.
| Evidence type | Distribution / release | Package | Channel | Version or source note | Source |
|---|---|---|---|---|---|
| ecosystem-boundary | PyPI / package | cryptography | Not a distribution channel | 42.0.4 | Official record |
Vendor notices and operational guidance
No connected vendor notice is available for this record.
Original sources and dates
- OSVConsulted: 2026-11-19T12:52:02.630ZArchived source JSON
Source publication: 2024-02-21T18:04:40.000Z
Source modification: 2026-09-10T03:50:09.815ZDocument fingerprint
f63ca43f6d59de8d8094f6d85f82bdcbc431605aa0b008f9f57a585e04f62d57 - OSVConsulted: 2026-11-19T12:52:02.630ZArchived source JSON
Source publication: 2024-02-21T17:15:09.000Z
Source modification: 2026-06-10T17:14:19.430ZDocument fingerprint
f63ca43f6d59de8d8094f6d85f82bdcbc431605aa0b008f9f57a585e04f62d57 - CVE ProgramConsulted: 2026-11-19T12:57:08.204ZArchived source JSON
Source publication: 2024-02-21T16:28:18.632Z
Source modification: 2024-08-14T20:01:52.628ZDocument fingerprint
dddb688a756399eea0ba35e46be21cdd2c419e90cf48dc9e036039c6dd09f093 - FIRST EPSSConsulted: 2026-11-19T18:27:10.600ZArchived source JSON
Source publication: not supplied
Source modification: not suppliedDocument fingerprint
55a64ee9ca0f1d908a48c56be557bd1ef72d684d2b38b659335bfacedc0274cc - CISA KEVConsulted: 2026-11-19T17:59:58.648ZArchived source JSON
Source publication: not supplied
Source modification: 2026-11-18T19:17:41.0354ZDocument fingerprint
a35fdc67c7d9802988dcfc1d3ff1198da327948d1db122ab7692ac201055ac56
Official status history
- UNKNOWN → PUBLISHED · · evidence