CVE-2024-26130Cryptography.io Cryptography
High 7.5 No auth needed
Follow: this CVE · Cryptography.io · Cryptography.io Cryptography We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 1.7% probability of exploitation in 30 days · percentile 77
- Auth required
- No
- Published
- Feb 21, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-476
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
What happens
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.
What to do
- Apply the vendor's security update for Cryptography.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | cryptography |
≥ 38.0.0 < 42.0.4 |
42.0.4 |
pip install "cryptography>=42.0.4" |
| PyPI | cryptography |
≥ 38.0.0 < 42.0.4 |
42.0.4 |
pip install "cryptography>=42.0.4" |
Per OSV / GitHub Advisories (GHSA-6vqw-3v5j-54x4, PYSEC-2024-225). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| cryptography.io | cryptography | ≥ 38.0.0 < 42.0.4 |
Official advisories
- python313-cryptography-50.0.0-1.1 on GA media · SUSE · openSUSE-SU-2026:11468-1 · Aug 6, 2026 Critical
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Issue Tracking Patch
- github.com Vendor Advisory