Email Module Vulnerability in Python Packages: CVE-2019-16056

python2 Updated 02 Oct 2025

Summary

06/09/2019
N/A
Yes i
High
7.5

ALPINE-CVE-2019-16056: An issue was discovered in Python through 2.7.16, 3.x through 3.5.7, 3.6.x through 3.6.9, and 3.7.x through 3.7.4. Affects python2 versions < 2.7.16-r3. Fixed in 2.7.16-r3. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Python is a widely-used high-level programming language known for its readability and versatility. It supports multiple programming paradigms and has a vast ecosystem of libraries and frameworks. The email module in Python is designed to manage email messages, including headers and payloads. However, certain versions of Python have a vulnerability that allows improper parsing of email addresses, which can lead to security issues.

Vulnerability Detail

The vulnerability identified as CVE-2019-16056 affects Python versions up to 2.7.16 and 3.x versions up to 3.7.4. It arises from the email module's failure to correctly parse email addresses containing multiple '@' characters. This flaw can enable attackers to craft malicious email addresses that bypass validation checks, potentially leading to unauthorized access or exploitation of applications that rely on the email module for processing email headers.

How To Fix

Minimum fixed version

2.7.16-r3

This is the first release that contains the fix.

sudo apk add --upgrade python2

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

Workaround

As a temporary workaround, applications can implement additional validation checks on email addresses before processing them. This can be done by using regular expressions to ensure that email addresses conform to expected formats and do not contain multiple '@' characters.

Conclusion

CVE-2019-16056 is a significant vulnerability in the Python email module that can lead to security risks if not addressed. Updating to the patched versions of Python and implementing validation checks are crucial steps to mitigate this vulnerability.

See every vulnerability recorded for python2 →

Share this vulnerability

FAQ

CVE-2019-16056 is a vulnerability in the Python email module that allows for improper parsing of email addresses, potentially leading to security issues.

The vulnerability affects Python versions up to 2.7.16 and 3.x versions up to 3.7.4.

You can use the Vulert platform to check if your application is affected by this vulnerability by analyzing your manifest file without needing to install any software.

The CVSS score for CVE-2019-16056 is 7.5, indicating a high severity level.

If immediate updates are not possible, implement additional validation checks on email addresses as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for python2.

How To Fix

Minimum fixed version

2.7.16-r3

This is the first release that contains the fix.

sudo apk add --upgrade python2

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