{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-26130","id":"CVE-2024-26130","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_has","descriptionLong":"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.","published":"2024-02-21T16:28:18.632Z","updated":"2026-11-11T10:31:09.436867896Z","reserved":"2024-02-14T17:40:03.687Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":7.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["pyca cryptography"],"affectedProducts":[{"vendor":"pyca","product":"cryptography","defaultStatus":null,"versions":[{"version":">= 38.0.0, < 42.0.4","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"cryptography","purl":"pkg:pypi/cryptography","ranges":[">=38.0.0 <42.0.4"],"fixed":["42.0.4"],"advisory":"GHSA-6vqw-3v5j-54x4"}],"cwes":["CWE-476"],"aliases":["GHSA-6vqw-3v5j-54x4","PYSEC-2024-225"],"references":[{"url":"https://github.com/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://github.com/pyca/cryptography/pull/10423","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Patch","fix","web","report"]},{"url":"https://github.com/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26130.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26130","tags":["advisory"]},{"url":"https://github.com/pyca/cryptography","tags":["package"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/cryptography/PYSEC-2024-225.yaml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-6vqw-3v5j-54x4","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial"},"epss":0.00831,"epssPercentile":0.58339,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-26130","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-26130","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-26130","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-6vqw-3v5j-54x4","ok":true,"note":"GHSA-6vqw-3v5j-54x4"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-26130","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}