Skip to main content

pyca cryptography EUVDEUVD-2026-52446

| CVE-2026-69247 HIGH
Observable Timing Discrepancy (CWE-208)
2026-08-03 GitHub_M GHSA-g6cj-pr64-35w5
8.2
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Target S/MIME gateway or PKCS#7 auto-decrypt service
  2. Delivery
    Submit crafted EnvelopedData with manipulated encryptedKey at high volume
  3. Exploit
    Observe distinguishable error message or timing side-channel per failure case
  4. Execution
    Adapt subsequent encryptedKey values based on oracle responses
  5. Persist
    Accumulate sufficient query results to reconstruct content-encryption key
  6. Impact
    Decrypt intercepted EnvelopedData ciphertext

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V6 - Authentication Timing attack prevention
Exploitation Conditions

Exploitation requires all of the following to be simultaneously true: (1) a deployed service calls pkcs7_decrypt_der, pkcs7_decrypt_pem, or pkcs7_decrypt_smime on attacker-supplied EnvelopedData addressed to a victim certificate; (2) the service returns a distinguishable outcome to the attacker - different error messages, HTTP status codes, response bodies, or measurable timing - across the four decryption failure modes; (3) the attacker can submit high volumes of adaptive queries (thousands to millions) without being blocked by rate limiting or anomaly detection; and (4) for Case 1 (RSA invalid-padding branch), the service must link against OpenSSL 3.0/3.1, LibreSSL, or BoringSSL - installations using pyca's official pip wheels with OpenSSL 3.2+ are immune to Case 1 only. Services that do not reflect decryption outcomes to untrusted parties are not exploitable. Authentication, as indicated by CVSS PR:N, is not required from the attacker's perspective, but the attacked service's own access controls (e.g., requiring a valid sender address before decryption) can limit the attack surface.

Impact

The CVSS 4.0 score of 8.2 with vector AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N accurately captures the asymmetry: confidentiality impact is high (key recovery enables plaintext recovery), but attack complexity is high and specific preconditions (AT:P) are required. Classic Bleichenbacher RSA attacks require thousands to millions of adaptive oracle queries, making this impractical against rate-limited or non-reflective services. No EPSS data was provided in the input, so exploitation probability cannot be quantified. No CISA KEV listing was present and no public exploit code has been identified at time of analysis. Despite the high CVSS score, real-world risk is substantially lower for the vast majority of cryptography library users who do not implement PKCS#7 auto-decryption services that reflect outcomes - the risk is concentrated in S/MIME gateway and mail-filter deployments. The vendor's own advisory notes that pyca's prebuilt wheels link against OpenSSL 3.2+, which blocks the RSA-level oracle (Case 1), leaving only the key-length and wrong-key distinguishability channels (Cases 2 and 3) for wheel users. Custom builds against OpenSSL 3.0/3.1, LibreSSL, or BoringSSL face the full oracle. A residual CBC padding oracle - inherent to PKCS#7 and not fixed by this patch - applies to all backends regardless of version and is separately documented by the vendor.

Exploit ScenarioDerived

An attacker who can deliver arbitrary S/MIME messages to a mail gateway running pyca/cryptography 44.0.0-49.x (linked against OpenSSL 3.0/3.1, LibreSSL, or BoringSSL) submits high volumes of crafted EnvelopedData with systematically manipulated encryptedKey fields targeting the gateway's recipient certificate. The gateway's distinguishable error responses - including the exact recovered key length leaked in case 2 - feed an adaptive Bleichenbacher query loop; over thousands to millions of queries the attacker recovers the content-encryption key and uses it to decrypt previously captured ciphertext. Services using pyca's official wheels (OpenSSL 3.2+) face a narrowed but still-exploitable oracle via cases 2 and 3 alone.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 PoC candidate (unverified) Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 03, 2026

PKCS#7 EnvelopedData decryption in the Python cryptography library (versions 44.0.0-49.x) leaks a Bleichenbacher oracle through four distinguishable error messages and timing side-channels during RSA PKCS#1 v1.5 key unwrapping, exposing the exact recovered plaintext length in one case. An attacker who can submit crafted EnvelopedData to an auto-decrypting service - such as an S/MIME gateway or mail filter that reflects outcomes at high volume - can adaptively recover the content-encryption key and decrypt intercepted messages. No public exploit has been identified at time of analysis, and exploitation requires very specific deployment conditions; the fix in version 50.0.0 applies RFC 3218 indistinguishability by substituting a random key on any failure.

RemediationAI

Upgrade pyca/cryptography to version 50.0.0, which applies the RFC 3218 indistinguishability fix: the expected content-encryption key length is resolved from the algorithm identifier before RSA decryption is attempted, and any failure (invalid RSA padding or recovered key of wrong length) substitutes a cryptographically random key of the correct size, so all failure paths perform identical work and produce identical error outputs. The advisory is at https://github.com/pyca/cryptography/security/advisories/GHSA-g6cj-pr64-35w5 and the patch is at https://github.com/pyca/cryptography/pull/15369 and commit 53fccd93413a8d7f07d6d8999681f27b75cffa3f. If immediate upgrade is not possible, compensating controls include: disabling or blocking any service path that auto-decrypts untrusted PKCS#7 EnvelopedData and returns distinguishable outcomes - error codes, response bodies, or observable latency - to the sender (trade-off: may break legitimate S/MIME gateway workflows); applying aggressive rate limiting on decryption endpoints to raise the cost of the adaptive querying required for Bleichenbacher exploitation (trade-off: does not eliminate the oracle, only increases attacker effort and time). Note that the vendor's updated documentation advises against decrypting untrusted EnvelopedData entirely due to the residual CBC padding oracle, which is a PKCS#7 protocol property unaddressed by this or any library-level fix.

Affected VersionsENISA

cryptography 44.0.0, < 50.0.0

Affected Packages

pypi cryptography fix: 50.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability resides in the Rust-backed PKCS#7 decryption implementation (src/rust/src/pkcs7.rs) of pyca/cryptography, introduced in version 44.0.0. PKCS#7 EnvelopedData uses RSA PKCS#1 v1.5 to wrap the content-encryption key, which is then used with AES-CBC to decrypt the message body. The four-stage pipeline - RSA decrypt → key length check → AES-CBC decrypt → PKCS#7 unpad - each failed with a distinct observable outcome: (1) invalid RSA padding yielded 'Decryption failed', (2) valid padding with wrong key length leaked the recovered length as 'Invalid key size (N) for AES.', (3) correct length with wrong key yielded 'Invalid padding bytes.', and (4) the real key succeeded. CWE-208 (Observable Discrepancy) applies directly: the length disclosure in case 2 and timing differences across all four cases form a multi-channel oracle. Case 1 is reachable only when the linked native library lacks implicit rejection - specifically OpenSSL 3.0 and 3.1, LibreSSL, and BoringSSL. OpenSSL 3.2+, used in pyca's own distributed wheels, returns a pseudorandom synthetic plaintext for invalid padding, suppressing case 1. The fix, per RFC 3218, resolves the content-encryption algorithm (and thus expected key size) before invoking RSA, then substitutes a cryptographically random key of the expected length on any failure, making all error paths computationally indistinguishable. CPE: cpe:2.3:a:pyca:cryptography:*:*:*:*:*:*:*:* (versions 44.0.0-49.x).

Know when Cryptography gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 8.2 HIGH
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.9 MEDIUM

Network-accessible oracle with high complexity due to required adaptive query volume and specific reflective-service deployment; key recovery yields only confidentiality impact with no integrity or availability effect.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Red Hat 5.9 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 03, 2026 - 22:17 EUVD
CVE Published
Aug 03, 2026 - 21:16 cve.org
HIGH 8.2

DescriptionCVE.org

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. From 44.0.0 until 50.0.0, pkcs7_decrypt_der, pkcs7_decrypt_pem, and pkcs7_decrypt_smime reported the outcome of decrypting a RecipientInfo's encryptedKey in several distinguishable ways, one of which disclosed the exact length recovered from the RSA operation. The same distinction was also observable by timing. An application that decrypts attacker-supplied EnvelopedData and reflects the outcome gives the attacker a Bleichenbacher oracle against the content-encryption key. Decryption ran as RSA PKCS#1 v1.5 decrypt of encryptedKey, build an AES cipher from the result, then AES-CBC decrypt and PKCS#7 unpad. Invalid RSA padding, a valid padding with a bad key length, a correct length with a wrong key, and the real key each failed or succeeded differently. Case 1 is reachable only where the linked library lacks implicit rejection: OpenSSL 3.0 and 3.1, LibreSSL, and BoringSSL. Exploitation requires a service that auto-decrypts untrusted EnvelopedData matching the victim certificate and answers adaptively at high volume, such as an S/MIME gateway or mail filter. This issue is fixed in 50.0.0.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 153 pypi packages depend on cryptography (93 direct, 60 indirect)

Ecosystem-wide dependent count for version 44.0.0.

Latest POC

1 PoC candidate from github (unverified)

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

The Python cryptography library (versions 44.0.0-49.x) contains a cryptographic weakness in PKCS#7 EnvelopedData decryption that exposes encrypted email to oracle-based attacks when routed through auto-decrypting services such as S/MIME mail filters or security gateways. An attacker positioned to submit crafted messages to these services can adaptively recover encryption keys and decrypt intercepted messages, compromising email confidentiality. Organizations using vulnerable versions in their email infrastructure require immediate inventory and patching.

Business Impact: High
Compensating Controls

Apply vendor patch: upgrade to Python cryptography version 50.0.0 or later. Until patch deployment is complete, restrict EnvelopedData decryption access to essential services and monitor security logs for repeated decryption failures or timing anomalies.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
High
one of the most-downloaded Python cryptography libraries globally
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

61
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2026-69249 HIGH POC
8.7 Aug 03

Certificate path building in python-cryptography before 49.0.0 is exploitable as a denial-of-service vector by attackers

CVE-2023-38325 HIGH POC
7.5 Jul 14

The cryptography package before 41.0.2 for Python mishandles SSH certificates that have critical options. Rated high sev

CVE-2023-49083 HIGH POC
7.5 Nov 29

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Rated high sever

CVE-2026-69248 MEDIUM POC
6.9 Aug 03

Wildcard DNS SAN matching in python-cryptography's X.509 chain verifier prior to 49.0.0 allows a leaf certificate bearin

CVE-2023-23931 MEDIUM POC
6.5 Feb 07

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Rated medium sev

CVE-2026-26007 HIGH
8.2 Feb 10

Private-key information disclosure in the pyca/cryptography Python package (versions <= 46.0.4) arises because public-ke

CVE-2016-9243 HIGH
7.5 Mar 27

HKDF in cryptography before 1.5.2 returns an empty byte-string if used with a length less than algorithm.digest_size. Ra

CVE-2023-50782 HIGH
7.5 Feb 05

A flaw was found in the python-cryptography package. Rated high severity (CVSS 7.5), this vulnerability is remotely expl

CVE-2024-26130 HIGH
7.5 Feb 21

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers. Rated high sever

CVE-2018-10903 HIGH
7.5 Jul 30

A flaw was found in python-cryptography versions between >=1.9.0 and <2.3. Rated high severity (CVSS 7.5), this vulnerab

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise Micro 5.3 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy