CVE-2020-13757: Python-RSA Access Restriction Bypass

rsa Updated 02 Oct 2025

Summary

24/03/2021
Yes i
High
7.5

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

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.

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for 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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback