Repository navigation
chore(python-deps): update dependency cryptography to v50 [security] - #1147
Merged
nfelt14 merged 1 commit intoAug 7, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1147 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 233 233
Branches 32 32
=========================================
Hits 233 233 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
renovate
Bot
deleted the
renovate/python-deps/pypi-cryptography-vulnerability
branch
August 5, 2026 14:46
renovate
Bot
force-pushed
the
renovate/python-deps/pypi-cryptography-vulnerability
branch
2 times, most recently
from
August 6, 2026 15:47
159bb93 to
0ec63d6
Compare
nfelt14
approved these changes
Aug 6, 2026
nfelt14
enabled auto-merge (squash)
August 6, 2026 15:49
renovate
Bot
force-pushed
the
renovate/python-deps/pypi-cryptography-vulnerability
branch
from
August 6, 2026 16:44
0ec63d6 to
1d20ac9
Compare
renovate
Bot
force-pushed
the
renovate/python-deps/pypi-cryptography-vulnerability
branch
from
August 7, 2026 16:10
1d20ac9 to
1476643
Compare
Test Results (ubuntu)
|
Test Results (macos)
|
Test Results (windows)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==49.0.0→==50.0.0cryptography: PKCS#7 EnvelopedData decryption exposes a Bleichenbacher oracle through distinguishable errors and timing
CVE-2026-69247 / GHSA-g6cj-pr64-35w5
More information
Details
Summary
pkcs7_decrypt_der,pkcs7_decrypt_pem, andpkcs7_decrypt_smimereported theoutcome of decrypting a
RecipientInfo'sencryptedKeyin severaldistinguishable 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
EnvelopedDataand reflects theoutcome gives the attacker a Bleichenbacher oracle against the
content-encryption key.
Introduced in 44.0.0. Fixed in 50.0.0.
Details
Decryption ran as: RSA PKCS#1 v1.5 decrypt of
encryptedKey→ build an AEScipher from the result → AES-CBC decrypt and PKCS#7 unpad. Each stage failed
differently, with no RFC 3218 mitigation:
Decryption failedInvalid key size (N) for AES., disclosingNInvalid padding bytes.Case 1 is reachable only where the linked library lacks implicit rejection:
OpenSSL 3.0 and 3.1, LibreSSL, and BoringSSL. On OpenSSL 3.2+, used in our wheels,
invalid padding instead returns a synthetic plaintext of
pseudorandom length, so the error channel does not distinguish conforming
ciphertexts.
Exploitation requires a service that auto-decrypts untrusted
EnvelopedDatamatching the victim certificate and answers adaptively at high volume, such as
an S/MIME gateway or mail filter.
Fix
Per RFC 3218, the content-encryption algorithm is now resolved before the
private key is used, so the expected key length is known in advance. If the RSA
decryption fails or recovers a key of the wrong length, a random key of the
expected length is substituted and decryption continues down an identical path.
All failures now report identically and perform the same work.
Not addressed by this fix
EnvelopedDatadoes not authenticate its content. Tampering withencryptedContentalone yields a CBC padding oracle that recovers plaintext atroughly 256 queries per byte, without recovering any key, on every backend. This
is a property of PKCS#7 rather than of this implementation, cannot be fixed in
the library, and is now documented.
Credit
Reported by @X1AOxiang.
Severity
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
pyca/cryptography (cryptography)
v50.0.0Compare Source
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.