Critical Vulnerability in Python 3.7: Potential Information Exposure and Code Execution Risks

python3.7 Updated 03 Oct 2025

Summary

23/05/2022
N/A
Yes i
Unrated
Not published

USN-5342-3: python3.7 vulnerability. Affects python3.7 versions < 3.7.5-2ubuntu1~18.04.2+esm1. Fixed in 3.7.5-2ubuntu1~18.04.2+esm1. How to fix ↓

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 3.7 is a widely used programming language known for its simplicity and versatility in various applications, including web development, data analysis, artificial intelligence, and more. The package provides essential libraries and tools for developers, making it a cornerstone in many software projects. However, vulnerabilities in Python can lead to severe security risks, as they may allow attackers to exploit weaknesses in the code, potentially leading to unauthorized access or data breaches.

Vulnerability Detail

The vulnerability identified as CVE-2021-3426 arises from improper handling of certain inputs in Python, which could allow an attacker to expose sensitive information. Additionally, CVE-2021-4189 highlights issues with handling FTP requests, while CVE-2022-0391 presents a risk of arbitrary code execution due to similar input handling flaws. These vulnerabilities specifically affect Ubuntu 18.04 LTS and could lead to significant security breaches if left unaddressed.

How To Fix

Minimum fixed version

3.7.5-2ubuntu1~18.04.2+esm1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python3.7

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, users can limit the exposure of their applications by restricting access to sensitive functionalities or inputs that may be exploited until the package is updated. Additionally, consider implementing input validation to prevent malicious data from being processed.

Conclusion

The vulnerabilities in Python 3.7, specifically CVE-2021-3426, CVE-2021-4189, and CVE-2022-0391, pose significant risks to applications running on Ubuntu 18.04 LTS. It is crucial for users to update their packages to the latest patched version to mitigate these risks. Additionally, utilizing tools like Vulert can aid in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for python3.7 →

Share this vulnerability

FAQ

CVE-2021-3426 is a vulnerability in Python 3.7 that allows improper handling of certain inputs, potentially leading to sensitive information exposure.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

CVE-2021-4189 involves improper handling of FTP requests, which could allow attackers to expose sensitive information, posing a risk to data security.

If immediate updates are not possible, consider implementing input validation and restricting access to sensitive functionalities as a temporary workaround.

Vulert is a tool that monitors and alerts for open-source vulnerabilities in your software using just a manifest file like package-lock.json, helping you maintain security without requiring code access.

Related vulnerabilities

Recent vulnerabilities recorded for python3.7.

How To Fix

Minimum fixed version

3.7.5-2ubuntu1~18.04.2+esm1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python3.7

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