CVE-2024-26130 (GCVE-0-2024-26130)
Vulnerability from cvelistv5 – Published: 2024-02-21 16:28 – Updated: 2024-08-14 20:01
VLAI
Title
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
Summary
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.
Severity
7.5 (High)
SSVC
Exploitation: none
Automatable: yes
Technical Impact: partial
CISA Coordinator (v2.0.3)
CWE
- CWE-476 - NULL Pointer Dereference
Assigner
References
3 references
| URL | Tags |
|---|---|
| https://github.com/pyca/cryptography/security/adv… | x_refsource_CONFIRM |
| https://github.com/pyca/cryptography/pull/10423 | x_refsource_MISC |
| https://github.com/pyca/cryptography/commit/97d23… | x_refsource_MISC |
Impacted products
2 products
| Vendor | Product | Version | |
|---|---|---|---|
| pyca | cryptography |
Affected:
>= 38.0.0, < 42.0.4
|
|
| cryptography_project | cryptography |
Affected:
38.0.0 , < 42.04
(custom)
cpe:2.3:a:cryptography_project:cryptography:*:*:*:*:*:python:*:* |
{
"containers": {
"adp": [
{
"providerMetadata": {
"dateUpdated": "2024-08-01T23:59:32.542Z",
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE"
},
"references": [
{
"name": "https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4",
"tags": [
"x_refsource_CONFIRM",
"x_transferred"
],
"url": "https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4"
},
{
"name": "https://github.com/pyca/cryptography/pull/10423",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/pyca/cryptography/pull/10423"
},
{
"name": "https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55",
"tags": [
"x_refsource_MISC",
"x_transferred"
],
"url": "https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55"
}
],
"title": "CVE Program Container"
},
{
"affected": [
{
"cpes": [
"cpe:2.3:a:cryptography_project:cryptography:*:*:*:*:*:python:*:*"
],
"defaultStatus": "unknown",
"product": "cryptography",
"vendor": "cryptography_project",
"versions": [
{
"lessThan": "42.04",
"status": "affected",
"version": "38.0.0",
"versionType": "custom"
}
]
}
],
"metrics": [
{
"other": {
"content": {
"id": "CVE-2024-26130",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "yes"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2024-08-14T19:56:07.150963Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2024-08-14T20:01:52.628Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"product": "cryptography",
"vendor": "pyca",
"versions": [
{
"status": "affected",
"version": "\u003e= 38.0.0, \u003c 42.0.4"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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."
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "HIGH",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"version": "3.1"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-476",
"description": "CWE-476: NULL Pointer Dereference",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2024-02-21T16:28:18.632Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4"
},
{
"name": "https://github.com/pyca/cryptography/pull/10423",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/pyca/cryptography/pull/10423"
},
{
"name": "https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55",
"tags": [
"x_refsource_MISC"
],
"url": "https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55"
}
],
"source": {
"advisory": "GHSA-6vqw-3v5j-54x4",
"discovery": "UNKNOWN"
},
"title": "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"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2024-26130",
"datePublished": "2024-02-21T16:28:18.632Z",
"dateReserved": "2024-02-14T17:40:03.687Z",
"dateUpdated": "2024-08-14T20:01:52.628Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1",
"vulnerability-lookup:meta": {
"epss": {
"cve": "CVE-2024-26130",
"date": "2026-06-27",
"epss": "0.00831",
"percentile": "0.52972"
},
"fkie_nvd": {
"descriptions": "[{\"lang\": \"en\", \"value\": \"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.\"}, {\"lang\": \"es\", \"value\": \"cryptography es un paquete manipulado para exponer recetas y primitivas criptogr\\u00e1ficas a los desarrolladores de Python. A partir de la versi\\u00f3n 38.0.0 y anteriores a la versi\\u00f3n 42.0.4, si se llama a `pkcs12.serialize_key_and_certificates` con un certificado cuya clave p\\u00fablica no coincide con la clave privada proporcionada y un `encryption_algorithm` con `hmac_hash` configurado (a trav\\u00e9s de `PrivateFormat .PKCS12.encryption_builder().hmac_hash(...)`, entonces se producir\\u00eda una desreferencia del puntero NULL, bloqueando el proceso de Python. Esto se resolvi\\u00f3 en la versi\\u00f3n 42.0.4, la primera versi\\u00f3n en la que se genera correctamente un `ValueError` .\"}]",
"id": "CVE-2024-26130",
"lastModified": "2024-11-21T09:01:59.757",
"metrics": "{\"cvssMetricV31\": [{\"source\": \"security-advisories@github.com\", \"type\": \"Secondary\", \"cvssData\": {\"version\": \"3.1\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H\", \"baseScore\": 7.5, \"baseSeverity\": \"HIGH\", \"attackVector\": \"NETWORK\", \"attackComplexity\": \"LOW\", \"privilegesRequired\": \"NONE\", \"userInteraction\": \"NONE\", \"scope\": \"UNCHANGED\", \"confidentialityImpact\": \"NONE\", \"integrityImpact\": \"NONE\", \"availabilityImpact\": \"HIGH\"}, \"exploitabilityScore\": 3.9, \"impactScore\": 3.6}]}",
"published": "2024-02-21T17:15:09.863",
"references": "[{\"url\": \"https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55\", \"source\": \"security-advisories@github.com\"}, {\"url\": \"https://github.com/pyca/cryptography/pull/10423\", \"source\": \"security-advisories@github.com\"}, {\"url\": \"https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4\", \"source\": \"security-advisories@github.com\"}, {\"url\": \"https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://github.com/pyca/cryptography/pull/10423\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}]",
"sourceIdentifier": "security-advisories@github.com",
"vulnStatus": "Awaiting Analysis",
"weaknesses": "[{\"source\": \"security-advisories@github.com\", \"type\": \"Secondary\", \"description\": [{\"lang\": \"en\", \"value\": \"CWE-476\"}]}]"
},
"nvd": "{\"cve\":{\"id\":\"CVE-2024-26130\",\"sourceIdentifier\":\"security-advisories@github.com\",\"published\":\"2024-02-21T17:15:09.863\",\"lastModified\":\"2026-06-17T07:17:09.793\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"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.\"},{\"lang\":\"es\",\"value\":\"cryptography es un paquete manipulado para exponer recetas y primitivas criptogr\u00e1ficas a los desarrolladores de Python. A partir de la versi\u00f3n 38.0.0 y anteriores a la versi\u00f3n 42.0.4, si se llama a `pkcs12.serialize_key_and_certificates` con un certificado cuya clave p\u00fablica no coincide con la clave privada proporcionada y un `encryption_algorithm` con `hmac_hash` configurado (a trav\u00e9s de `PrivateFormat .PKCS12.encryption_builder().hmac_hash(...)`, entonces se producir\u00eda una desreferencia del puntero NULL, bloqueando el proceso de Python. Esto se resolvi\u00f3 en la versi\u00f3n 42.0.4, la primera versi\u00f3n en la que se genera correctamente un `ValueError` .\"}],\"affected\":[{\"source\":\"security-advisories@github.com\",\"affectedData\":[{\"vendor\":\"pyca\",\"product\":\"cryptography\",\"versions\":[{\"version\":\"\u003e= 38.0.0, \u003c 42.0.4\",\"status\":\"affected\"}]}]},{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"affectedData\":[{\"vendor\":\"cryptography_project\",\"product\":\"cryptography\",\"defaultStatus\":\"unknown\",\"cpes\":[\"cpe:2.3:a:cryptography_project:cryptography:*:*:*:*:*:python:*:*\"],\"versions\":[{\"version\":\"38.0.0\",\"lessThan\":\"42.04\",\"versionType\":\"custom\",\"status\":\"affected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":7.5,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":3.9,\"impactScore\":3.6},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":7.5,\"baseSeverity\":\"HIGH\",\"attackVector\":\"NETWORK\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"NONE\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":3.9,\"impactScore\":3.6}],\"ssvcV203\":[{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"ssvcData\":{\"timestamp\":\"2024-08-14T19:56:07.150963Z\",\"id\":\"CVE-2024-26130\",\"options\":[{\"exploitation\":\"none\"},{\"automatable\":\"yes\"},{\"technicalImpact\":\"partial\"}],\"role\":\"CISA Coordinator\",\"version\":\"2.0.3\"}}]},\"weaknesses\":[{\"source\":\"security-advisories@github.com\",\"type\":\"Secondary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-476\"}]},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-476\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:a:cryptography.io:cryptography:*:*:*:*:*:python:*:*\",\"versionStartIncluding\":\"38.0.0\",\"versionEndExcluding\":\"42.0.4\",\"matchCriteriaId\":\"BDAE857E-8C66-4574-88CD-615D866340CA\"}]}]}],\"references\":[{\"url\":\"https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Patch\"]},{\"url\":\"https://github.com/pyca/cryptography/pull/10423\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Issue Tracking\",\"Patch\"]},{\"url\":\"https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4\",\"source\":\"security-advisories@github.com\",\"tags\":[\"Vendor Advisory\"]},{\"url\":\"https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://github.com/pyca/cryptography/pull/10423\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Issue Tracking\",\"Patch\"]},{\"url\":\"https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Vendor Advisory\"]}]}}",
"vulnrichment": {
"containers": "{\"adp\": [{\"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-14T19:59:58.743Z\"}}], \"cna\": {\"title\": \"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\", \"source\": {\"advisory\": \"GHSA-6vqw-3v5j-54x4\", \"discovery\": \"UNKNOWN\"}, \"metrics\": [{\"cvssV3_1\": {\"scope\": \"UNCHANGED\", \"version\": \"3.1\", \"baseScore\": 7.5, \"attackVector\": \"NETWORK\", \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H\", \"integrityImpact\": \"NONE\", \"userInteraction\": \"NONE\", \"attackComplexity\": \"LOW\", \"availabilityImpact\": \"HIGH\", \"privilegesRequired\": \"NONE\", \"confidentialityImpact\": \"NONE\"}}], \"affected\": [{\"vendor\": \"pyca\", \"product\": \"cryptography\", \"versions\": [{\"status\": \"affected\", \"version\": \"\u003e= 38.0.0, \u003c 42.0.4\"}]}], \"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\"]}, {\"url\": \"https://github.com/pyca/cryptography/pull/10423\", \"name\": \"https://github.com/pyca/cryptography/pull/10423\", \"tags\": [\"x_refsource_MISC\"]}, {\"url\": \"https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55\", \"name\": \"https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55\", \"tags\": [\"x_refsource_MISC\"]}], \"descriptions\": [{\"lang\": \"en\", \"value\": \"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.\"}], \"problemTypes\": [{\"descriptions\": [{\"lang\": \"en\", \"type\": \"CWE\", \"cweId\": \"CWE-476\", \"description\": \"CWE-476: NULL Pointer Dereference\"}]}], \"providerMetadata\": {\"orgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"shortName\": \"GitHub_M\", \"dateUpdated\": \"2024-02-21T16:28:18.632Z\"}}}",
"cveMetadata": "{\"cveId\": \"CVE-2024-26130\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-08-14T20:01:52.628Z\", \"dateReserved\": \"2024-02-14T17:40:03.687Z\", \"assignerOrgId\": \"a0819718-46f1-4df5-94e2-005712e83aaa\", \"datePublished\": \"2024-02-21T16:28:18.632Z\", \"assignerShortName\": \"GitHub_M\"}",
"dataType": "CVE_RECORD",
"dataVersion": "5.1"
}
}
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…