{"id":"CVE-2024-26130","state":"PUBLISHED","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","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.","publishedAt":"2024-02-21T16:28:18.632Z","updatedAt":"2024-08-14T20:01:52.628Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["pyca cryptography"],"affected":[{"vendor":"pyca","product":"cryptography","versions":[{"version":">= 38.0.0, < 42.0.4","status":"affected"}]}],"references":["https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4","https://github.com/pyca/cryptography/pull/10423","https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55"],"weaknesses":["CWE-476"],"ingestedAt":"2026-10-29T20:07:10.607Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/26xxx/CVE-2024-26130.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2024-26130","state":"PUBLISHED","datePublished":"2024-02-21T16:28:18.632Z","dateUpdated":"2024-08-14T20:01:52.628Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2024-02-14T17:40:03.687Z"},"containers":{"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","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."}],"affected":[{"vendor":"pyca","product":"cryptography","versions":[{"version":">= 38.0.0, < 42.0.4","status":"affected"}]}],"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"]}],"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","lang":"en","description":"CWE-476: NULL Pointer Dereference","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2024-02-21T16:28:18.632Z"},"source":{"advisory":"GHSA-6vqw-3v5j-54x4","discovery":"UNKNOWN"}},"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":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-01T23:59:32.542Z"}},{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"cryptography_project","product":"cryptography","defaultStatus":"unknown","versions":[{"version":"38.0.0","status":"affected","lessThan":"42.04","versionType":"custom"}],"cpes":["cpe:2.3:a:cryptography_project:cryptography:*:*:*:*:*:python:*:*"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-08-14T19:56:07.150963Z","id":"CVE-2024-26130","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-08-14T20:01:52.628Z"}}]}}}