Live threats

All CVEs / Cryptography.io

CVE-2024-26130Cryptography.io Cryptography

High 7.5 No auth needed

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Cryptography.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
cryptography.iocryptography≥ 38.0.0 < 42.0.4

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.