A high-severity vulnerability has been discovered in the cryptography Python package, one of the most widely used libraries for securing modern applications. The flaw, tracked as CVE-2026-26007, carries a CVSS score of 8.2 and strikes at the heart of Elliptic Curve Cryptography (ECC), potentially allowing attackers to recover private keys through a sophisticated “Subgroup Attack.”
The vulnerability affects developers using SECT curves for digital signatures or key exchange, turning what should be a secure handshake into a leaky conversation.
The issue lies in how the library handles public keys. Specifically, functions like load_pem_public_key() and public_key_from_numbers() fail to verify if a point truly belongs to the expected “prime-order subgroup” of the curve.
The library assumes the keys it receives are well-behaved, but it doesn’t check.
“This missing validation allows an attacker to provide a public key point P from a small-order subgroup,” the advisory explains.
By feeding the application a malicious public keyβone that mathematically sits in a “weak” spot on the curveβan attacker can trick the victim’s system into performing calculations that leak data.
The consequences of this validation failure are severe, particularly for Elliptic Curve Diffie-Hellman (ECDH), a standard protocol for creating shared secrets.
When a victim computes a shared secret using the attacker’s “weak” point, the math breaks down in a predictable way. “When the victim computes the shared secret… this leaks information about victim_private_key mod (small_subgroup_order),” the report states.
For certain curves (those with a “cofactor > 1”), this allows the attacker to recover the “least significant bits of the private key”. Repeat this process enough times, or combine it with other weaknesses, and the private keyβthe crown jewel of encryptionβcan be fully reconstructed.
The flaw also impacts ECDSA, the standard for digital signatures. If an application accepts these weak keys, it becomes “easy to forge signatures on the small subgroup,” allowing attackers to impersonate trusted entities.
The vulnerability specifically impacts SECT curves; other curve types are not affected.
The maintainers have released a fix in version 46.0.5.
Developers relying on cryptography for Python applications should upgrade immediately to ensure their cryptographic primitives are validating keys correctly.
Related Posts:
- Lazarus Subgroup Deploys Three Custom RATs in Targeted Crypto Attacks
- GPUHammer: First Rowhammer Attack on GDDR6 GPU Memory Induces Bit Flips, Degrades AI Models
- Beyond Compliance: Broadcom’s New Private Cloud Tools Secure AI Workloads
Support Our Threat Intelligence
If you find our CVE report and cybersecurity news helpful, consider supporting our work.