CVE-2024-26130 json
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
published 2024-02-21 2 y ago modified 2026-09-10 1 mo ago also EUVD-2024-0031 , GHSA-6vqw-3v5j-54x4 , PYSEC-2024-225
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.8%
- EPSS 0.8% chance of exploitation in 30 days, percentile 57%
- public exploits
- 0
- none known
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.
Patch / fix
- pypi cryptography 42.0.4
- cryptography_project cryptography 42.04
- python-cryptography Debian 12 38.0.4-3+deb12u1
- python-cryptography Debian 14, Debian 13 42.0.5-1
debian advisories DEBIAN-CVE-2024-26130
- python-cryptography Ubuntu 24.04 LTS 41.0.7-4ubuntu0.1
ubuntu advisories UBUNTU-CVE-2024-26130
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python3.12-cryptography RHEL 9 41.0.7-2.el9_6.1
- python-django rhui 4 4.2.15-1.el8ui
- python-grpcio rhui 4 1.65.4-1.el8ui
- python-jinja2 rhui 4 3.1.4-1.el8ui
- python-aiohttp rhui 4 3.9.4-1.el8ui
- python-gunicorn rhui 4 22.0.0-1.0.1.el8ui
- python-requests rhui 4 2.32.3-2.el8ui
- python-sqlparse rhui 4 0.5.0-1.el8ui
red hat advisories RHSA-2025:15608RHSA-2025:1335RHSA-2024:7987RHSA-2024:3781
- python-cryptography SLE Module for Python 3 15 SP6, openSUSE Leap 15.6 41.0.3-150600.23.3.1
- python-cryptography SLE Module for Python 3 15 SP5, openSUSE Leap 15.5 41.0.3-150400.16.15.1
suse advisories SUSE-SU-2024:2138-1SUSE-SU-2024:0763-1
- python-cryptography openSUSE Tumbleweed 50.0.0-1.1
- python-cryptography openSUSE Tumbleweed 42.0.4-1.1
opensuse advisories openSUSE-SU-2026:11468-1openSUSE-SU-2024:13710-1
- python3.12-cryptography AlmaLinux 9 41.0.7-2.el9_6.1
almalinux advisories ALSA-2025:15608
- python3.12-cryptography Rocky Linux 9 41.0.7-2.el9_6.1
rocky linux advisories RLSA-2025:15608
- github.com/pyca/cryptography@97d2316 commit
- github.com/pyca/cryptography#10423 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-26130 updated cvss 7.5
python-cryptography: NULL pointer dereference with pkcs12.serialize_key_and_certificates when called with a non-matching certificate and private key and an hmac_hash override
-
Red Hat Ansible Automation Platform 2.4 for RHEL 8 python39-cryptography 42.0.5-1.el8ap, python3x-cryptography 42.0.5-1.el8ap Red Hat Ansible Automation Platform 2.4 for RHEL 9 python-cryptography 42.0.5-1.el9ap, python3-cryptography 42.0.5-1.el9apfixed: vendor fix RHSA-2024:3781
-
Red Hat Enterprise Linux AppStream (v. 9) python3.12-cryptography 41.0.7-2.el9_6.1fixed: vendor fix RHSA-2025:15608
-
Red Hat Satellite 6.15 for RHEL 8 python-cryptography 42.0.8-1.el8pc, python3.11-cryptography 42.0.8-1.el8pc, rubygem-foreman_theme_satellite 13.3.0-0.1.el8satfixed: vendor fix RHSA-2024:7987
-
Red Hat RHUI 4 for RHEL 8 python-cryptography 42.0.8-1.el8ui, python3.11-cryptography 42.0.8-1.el8uifixed: vendor fix RHSA-2025:1335
-
Red Hat Ansible Automation Platform 2.4 for RHEL 8 receptor 1.4.8-1.el8ap, python39-idna 3.7-1.el8ap, python3x-idna 3.7-1.el8ap, receptorctl 1.4.8-1.el8ap, ansible-core 2.15.11-1.el8ap, ansible-test 2.15.11-1.el8ap, +37 more Red Hat Ansible Automation Platform 2.4 for RHEL 9 receptor 1.4.8-1.el9ap, python-idna 3.7-1.el9ap, python3-idna 3.7-1.el9ap, receptorctl 1.4.8-1.el9ap, python-black 22.8.0-2.el9ap, python-jinja2 3.1.4-1.el9ap, +37 more Red Hat Enterprise Linux 7 python-cryptography, python2-cryptography Red Hat Enterprise Linux 8 python-cryptography, python3-cryptography Red Hat Enterprise Linux 9 python-cryptography, python3-cryptography, python3.11-cryptography Red Hat Satellite 6.15 for RHEL 8 foreman 3.9.1.10-1.el8sat, satellite 6.15.4-2.el8sat, python-django 4.2.15-1.el8pc, foreman-cli 3.9.1.10-1.el8sat, foreman-ec2 3.9.1.10-1.el8sat, foreman-pcp 3.9.1.10-1.el8sat, +28 morenot affected: vulnerable code not present
+1 more productsfewer
Red Hat RHUI 4 for RHEL 8 libcomps 0.1.21-1.el8ui, python-jq 1.6.0-4.el8ui, python-xlrd 2.0.1-9.el8ui, python-xlwt 1.3.0-7.el8ui, python-yarl 1.8.2-5.el8ui, python-zipp 3.4.0-8.el8ui, +196 more
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.83% chance of exploitation in the next 30 days, higher than 57% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | cryptography | >=38.0.0, <42.0.4 |
42.0.4 |
Affected products
- pyca cryptography
- cryptography_project cryptography
Classification
- Weakness
-
- CWE-476 NULL Pointer Dereference
References
-
github.com
/pyca/cryptography/pull/10423
web, issue-tracking, patch, report
-
github.com
/pyca/cryptography/commit/97d231672763cdb5959a3b191e692a362f1b9e55
web, patch
-
github.com
/pyca/cryptography/security/advisories/GHSA-6vqw-3v5j-54x4
web, vendor-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2024-26130
advisory
-
github.com
/pyca/cryptography
package
-
github.com
/pypa/advisory-database/tree/main/vulns/cryptography/PYSEC-2024-225.yaml
web
-
github.com
/advisories/GHSA-6vqw-3v5j-54x4
advisory
Sources
- CVE List CVE-2024-26130
- GitHub Advisory GHSA-6vqw-3v5j-54x4
- NVD CVE-2024-26130
- OSV PYSEC-2024-225
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.