Skip to content

GHSA-r6ph-v2qm-q3c2 CVE-2026-26007 PYSEC-2026-2141

cryptography Vulnerable to a Subgroup Attack Due to Missing Subgroup Validation for SECT Curves

High PyPI
Severity
8.2 / 10
High · CVSS 4.0
Exploit chance (EPSS)
0.39%
Chance of exploitation in the next 30 days. Higher than 33.10% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-345 Insufficient Verification of Data Authenticity
Fix
46.0.5
Upgrade cryptography to this version or later

Description

Vulnerability Summary

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.

Credit

This vulnerability was discovered by:

  • XlabAI Team of Tencent Xuanwu Lab
  • Atuin Automated Vulnerability Discovery Engine

Affected versions

PyPI

PackageVulnerableFixed in
cryptography
<= 46.0.4
No fix yet
cryptography
< 46.0.5
46.0.5

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

cryptography PyPI → 46.0.5

pip
pip install --upgrade "cryptography>=46.0.5"
poetry
poetry add "cryptography>=46.0.5"
uv
uv add "cryptography>=46.0.5"

Severity breakdown

CVSS 4.0 8.2

CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Attack vector
Network
Attack complexity
High
Attack requirements
None
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
High
Integrity (vulnerable system)
None
Availability (vulnerable system)
None
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None
Exploit maturity
Not defined
Scope
X

CVSS 3.1 6.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Weakness

CWE-345: Insufficient Verification of Data Authenticity

The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-m2h6-j472-rp4c
python-cryptography verifier accepts wildcard DNS names allowing escape from permittedSubtrees
Medium Also affects cryptography
GHSA-jwv3-5hgf-82ww
python-cryptography: Duplicate self-signed intermediates can cause exponential path-building
High Also affects cryptography
GHSA-g6cj-pr64-35w5
cryptography: PKCS#7 EnvelopedData decryption exposes a Bleichenbacher oracle through distinguishable errors and timing
High Also affects cryptography
GHSA-537c-gmf6-5ccf
Vulnerable OpenSSL included in cryptography wheels
High Also affects cryptography
GHSA-p423-j2cm-9vmq
Cryptography vulnerable to buffer overflow if non-contiguous buffers were passed to APIs
Medium Also affects cryptography
GHSA-m959-cc7f-wv43
cryptography has incomplete DNS name constraint enforcement on peer names
Low Also affects cryptography
GHSA-79v4-65xg-pq4g
Vulnerable OpenSSL included in cryptography wheels
Medium Also affects cryptography
GHSA-h4gh-qq45-vh27
pyca/cryptography has a vulnerable OpenSSL included in cryptography wheels
Medium Also affects cryptography

Credits: A7um, XlabAITeam, keenanwgn, tl2cents

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor