Description Preview
Python-cryptography 3.2 contains a vulnerability to Bleichenbacher timing attacks in its RSA decryption API. The issue occurs when processing valid PKCS#1 v1.5 ciphertext, where timing differences in the processing can potentially leak information about the private key. This vulnerability could allow an attacker to recover the private key through careful timing analysis of multiple decryption operations.
Overview
This vulnerability (CVE-2020-25659) affects the python-cryptography library version 3.2. The issue is related to the RSA decryption implementation that processes PKCS#1 v1.5 padding. Bleichenbacher timing attacks exploit the fact that valid and invalid ciphertexts may take different amounts of time to process, creating a side-channel that can be used to gradually extract information about the private key. This type of attack is particularly concerning for applications that use RSA encryption for sensitive operations, as it can lead to complete key compromise without direct access to the system.
Remediation
To address this vulnerability, users should:
- Update to a patched version of python-cryptography (versions after 3.2).
- If immediate updating is not possible, consider implementing additional countermeasures such as:
- Adding random delays to cryptographic operations to mask timing differences
- Using constant-time implementations for cryptographic operations where available
- Limiting the number of decryption operations that can be performed with the same key
- Review applications that use RSA decryption to ensure they're not vulnerable to timing analysis.
- Consider migrating to more modern padding schemes like OAEP (Optimal Asymmetric Encryption Padding) which are designed to be resistant to these types of attacks.
References
- Patch commit: https://github.com/pyca/cryptography/pull/5507/commits/ce1bef6f1ee06ac497ca0c837fbd1c7ef6c2472b
- Oracle Critical Patch Update Advisory - April 2022: https://www.oracle.com/security-alerts/cpuapr2022.html
- Oracle Critical Patch Update Advisory - July 2022: https://www.oracle.com/security-alerts/cpujul2022.html
- For more information on Bleichenbacher attacks: "Chosen Ciphertext Attacks Against Protocols Based on the RSA Encryption Standard PKCS #1" by Daniel Bleichenbacher
Industry ExposureMost to leastThis section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.
This section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.
- ManufacturingManufacturing
- Finance and InsuranceFinance and Insurance
- Professional, Scientific, & Technical ServicesProfessional, Scientific, & Technical Services
- Health Care & Social AssistanceHealth Care & Social Assistance
- Retail TradeRetail Trade
- Public AdministrationPublic Administration
- Arts, Entertainment & RecreationArts, Entertainment & Recreation
- Management of Companies & EnterprisesManagement of Companies & Enterprises
- Transportation & WarehousingTransportation & Warehousing
- Educational ServicesEducational Services
- InformationInformation
- Other Services (except Public Administration)Other Services (except Public Administration)
- UtilitiesUtilities
- Wholesale TradeWholesale Trade
- Accommodation & Food ServicesAccommodation & Food Services
- Administrative, Support, Waste Management & Remediation ServicesAdministrative, Support, Waste Management & Remediation Services
- Agriculture, Forestry Fishing & HuntingAgriculture, Forestry Fishing & Hunting
- ConstructionConstruction
- MiningMining
- Real Estate Rental & LeasingReal Estate Rental & Leasing