Denial of Service Vulnerability in Python Packages: CVE-2018-1060

python2 Updated 02 Oct 2025

Summary

18/06/2018
N/A
Yes i
High
7.5

ALPINE-CVE-2018-1060: python before versions 2.7.15, 3.4.9, 3.5.6rc1, 3.6.5rc1 and 3.7.0 is vulnerable to catastrophic backtracking in pop3lib's apop() method. Affects python2 versions < 2.7.15-r0. Fixed in 2.7.15-r0. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Python is a widely-used high-level programming language known for its readability and versatility. It supports multiple programming paradigms and is used in various applications, from web development to data analysis. The vulnerability identified as CVE-2018-1060 affects Python versions prior to 2.7.15, 3.4.9, 3.5.6rc1, 3.6.5rc1, and 3.7.0, specifically in the pop3lib's apop() method, which is used for handling authentication in the POP3 email protocol. This vulnerability can lead to denial of service attacks, making it crucial for users to address it promptly.

Vulnerability Detail

The vulnerability arises from catastrophic backtracking in the pop3lib's apop() method, which can be exploited by an attacker to cause a denial of service. This occurs when the method processes specially crafted input that leads to excessive resource consumption, potentially crashing the service. The flaw is significant as it can disrupt email services relying on the affected versions of Python, impacting users and organizations relying on these services for communication.

How To Fix

Minimum fixed version

2.7.15-r0

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, users can avoid using the pop3lib's apop() method until they can update to a patched version. Additionally, implementing input validation and limiting the size of input can help reduce the risk of denial of service attacks.

Conclusion

CVE-2018-1060 is a critical vulnerability in Python's pop3lib that can lead to denial of service attacks. Users are strongly encouraged to update their Python packages to the latest patched versions to mitigate this risk. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for python2 →

Share this vulnerability

FAQ

CVE-2018-1060 is a vulnerability in Python's pop3lib that can lead to denial of service due to catastrophic backtracking.

Affected versions include Python 2.7.15 and earlier, 3.4.9 and earlier, 3.5.6rc1, 3.6.5rc1, and 3.7.0.

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

The CVSS score of CVE-2018-1060 is 7.5, indicating a high severity level.

If immediate updates are not possible, consider implementing input validation and avoiding the use of the vulnerable method as a temporary measure.

Related vulnerabilities

Recent vulnerabilities recorded for python2.

How To Fix

Minimum fixed version

2.7.15-r0

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