Executive brief
The PyCA cryptography library, a widely used tool for securing Python applications, failed to properly validate certain types of security keys. This flaw could allow an attacker to trick a system into using a weak key, potentially revealing parts of a private encryption key or allowing the forgery of digital signatures. While the issue primarily affects less common 'binary' elliptic curves, it poses a risk to data confidentiality and the integrity of secure communications.
Technical details
The vulnerability exists in the public_key_from_numbers, load_der_public_key, and load_pem_public_key functions of the PyCA cryptography library. These functions fail to verify that a provided public key point belongs to the expected prime-order subgroup of the curve, specifically affecting SECT (binary) curves with a cofactor greater than 1. An attacker can provide a point from a small-order subgroup to perform a subgroup attack. In ECDH key exchange, this can leak the least significant bits of the victim's private key (private_key mod small_subgroup_order). In ECDSA, it allows for the forgery of signatures. The issue is resolved in version 46.0.5 by implementing mandatory subgroup validation for curves with cofactor > 1.
Affected products
- PyCA cryptography < 46.0.5
- Red Hat Red Hat Enterprise Linux
- Red Hat Red Hat OpenShift AI
Timeline
- 2026-02-10: disclosed
- 2026-02-10: patched: Fixed in version 46.0.5
- 2026-02-10: advisory
References
- https://github.com/pyca/cryptography/commit/0eebb9dbb6343d9bc1d91e5a2482ed4e054a6d8c
- https://github.com/pyca/cryptography/security/advisories/GHSA-r6ph-v2qm-q3c2
- http://www.openwall.com/lists/oss-security/2026/02/10/4
- https://access.redhat.com/errata/RHSA-2026:10184
- https://access.redhat.com/errata/RHSA-2026:12176
- https://access.redhat.com/errata/RHSA-2026:13512
- https://access.redhat.com/errata/RHSA-2026:13545