CVE-2020-13757: Python-RSA Access Restriction Bypass
Summary
CVE-2020-13757: Python-RSA decryption of ciphertext leads to DoS. Affects rsa versions < 4.1. Fixed in 4.1. How to fix ↓
Also tracked for
- python-rsa · Debian:11
The same CVE-2020-13757 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Python-RSA is a Python library that provides a simple interface for generating and verifying RSA keys, encrypting and decrypting data, signing and verifying signatures, and more. It is widely used in various applications for cryptographic operations. However, Python-RSA version 4.0 has a vulnerability that allows an attacker to bypass access restrictions during decryption of ciphertext. This can potentially have security implications, such as revealing the usage of Python-RSA or causing unexpected application behavior due to the manipulation of ciphertext length.
Vulnerability Detail
The vulnerability in Python-RSA 4.0 arises from its failure to consider leading '\0' bytes during the decryption process. This oversight can be exploited by an attacker to infer the usage of Python-RSA in an application or manipulate the length of ciphertext to trigger unintended consequences. For example, excessive memory allocation may occur due to the acceptance of manipulated ciphertext. The impact of this vulnerability can vary depending on the specific implementation and usage of Python-RSA.
How To Fix
Latest published version: 4.9.1 as of 22 Oct 2026
pip install --upgrade "rsa==4.9.1"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
4.1
This is the first release that contains the fix.
pip install --upgrade "rsa==4.1"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to update to the fixed version of Python-RSA to mitigate the risk.
Conclusion
The Python-RSA library version 4.0 has an access restriction bypass vulnerability that can be exploited to infer the usage of Python-RSA or cause unexpected behavior. It is crucial to update to version 4.1 or later to mitigate the risk. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for rsa →
FAQ
Python-RSA is a Python library used for RSA key generation, encryption, decryption, and other cryptographic operations.
The impact of this vulnerability can vary depending on the specific implementation and usage of Python-RSA. It could potentially reveal the usage of Python-RSA in an application or cause unexpected behavior due to manipulated ciphertext length.
To fix this vulnerability, it is recommended to upgrade to Python-RSA version 4.1 or later. Run the command 'pip install --upgrade rsa' to update the package.
No, there is no known workaround for this vulnerability. Updating to the fixed version is necessary.
For more information about this vulnerability, you can refer to the GitHub advisory at: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/03/GHSA-537h-rv9q-vvph/GHSA-537h-rv9q-vvph.json
References
Related vulnerabilities
Recent vulnerabilities recorded for rsa.