Vulnonym.com

CVE-2026-26007 - Fun Implements

Description

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Prior to 46.0.5, the public_key_from_numbers (or EllipticCurvePublicNumbers.public_key()), EllipticCurvePublicNumbers.public_key(), load_der_public_key() and load_pem_public_key() functions do not verify that the point belongs to the expected prime-order subgroup of the curve. This missing validation allows an attacker to provide a public key point P from a small-order subgroup. This can lead to security issues in various situations, such as the most commonly used signature verification (ECDSA) and shared key negotiation (ECDH). When the victim computes the shared secret as S = [victim_private_key]P via ECDH, this leaks information about victim_private_key mod (small_subgroup_order). For curves with cofactor > 1, this reveals the least significant bits of the private key. When these weak public keys are used in ECDSA , it’s easy to forge signatures on the small subgroup. Only SECT curves are impacted by this. This vulnerability is fixed in 46.0.5.

Reference

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

Remediation Guide

  1. Upgrade the cryptography Package
    Immediately upgrade to version 46.0.5 or later using pip:
    pip install --upgrade cryptography>=46.0.5
    
  2. Verify the Upgrade
    Confirm the installed version is 46.0.5 or higher:
    pip show cryptography
    

    Ensure the version number meets or exceeds 46.0.5.

  3. Review Code for Vulnerable Functions
    Search your codebase for usage of the following functions and ensure they are only called with trusted input after upgrade:
    • public_key_from_numbers()
    • EllipticCurvePublicNumbers.public_key()
    • load_der_public_key()
    • load_pem_public_key()
  4. Validate Public Keys Post-Upgrade
    Even after upgrading, implement additional input validation in critical applications:
    • Confirm public keys are generated from trusted sources.
    • Reject any public key that does not lie on the expected curve or is outside the prime-order subgroup.
    • Use cryptography’s built-in validation (now enforced in 46.0.5) as the baseline.
  5. Audit ECDH and ECDSA Implementations
    Review all Elliptic Curve Diffie-Hellman (ECDH) and ECDSA usage in your application:
    • Ensure no externally supplied public keys are used without validation.
    • Replace any custom or deprecated key validation logic with the library’s built-in checks.
  6. Test in Staging Environment
    Deploy the upgraded package to a staging environment and test:
    • Signature verification workflows.
    • Key exchange (ECDH) operations.
    • Error handling for malformed keys.
  7. Deploy and Monitor
    Roll out the update to production and monitor for:
    • Unexpected errors or performance degradation.
    • Security alerts related to cryptographic operations.
  8. Document and Communicate
    Update internal documentation to reflect the patch and communicate the fix to relevant teams (dev, security, ops).

Context within ISO/IEC 27001 and NIST Frameworks

ISO/IEC 27001

This vulnerability directly impacts A.8.24: Cryptographic controls (Control 8.24 in ISO/IEC 27001:2022).

  • Control A.8.24.1: Use of cryptographic controls — Requires that cryptographic algorithms and parameters are selected appropriately, implemented correctly, and validated to prevent exploitation.
  • Control A.8.24.3: Protection of cryptographic keys — Implies that public key inputs must be validated to prevent leakage of private key material.
  • Control A.8.24.5: Use of cryptographic techniques to ensure data integrity — Failure to validate public key subgroup membership undermines signature integrity in ECDSA.

Failure to remediate violates the requirement for secure cryptographic implementations and exposes the organization to loss of confidentiality and integrity in key exchange and signature processes.

NIST SP 800-53 (Rev. 5)

This vulnerability maps to the following controls:

  • SC-13 (Cryptographic Protection) — Requires cryptographic modules to protect data at rest and in transit. Unvalidated public keys compromise the integrity of ECDH key derivation.
  • SC-13-1 (Cryptographic Module Validation) — Mandates that cryptographic libraries are validated and updated to address known weaknesses.
  • SI-7 (Flaw Remediation) — Requires prompt remediation of known software flaws. The existence of an unpatched version violates this control.
  • SI-10 (Information System Monitoring) — Suggests monitoring for use of deprecated or vulnerable cryptographic libraries.

NIST SP 800-57 further emphasizes key validation in public key cryptography (Section 5.6.1), requiring that public keys be validated to ensure they lie within the correct subgroup — precisely what was missing prior to version 46.0.5.