Python 2.7 - Integer Overflow and Heap Corruption

python2.7 Updated 02 Oct 2025

Summary

24/11/2017
N/A
Yes i
Unrated
Not published

DLA-1189-1: python2.7 - security update. Affects python2.7 versions < 2.7.3-6+deb7u4. Fixed in 2.7.3-6+deb7u4. 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 2.7 is an interactive high-level object-oriented language widely used for various applications. It is the reference implementation of Python, also known as CPython. This vulnerability affects versions 2.6 and 2.7 of CPython. The issue arises due to improper handling of large strings with escaped characters, leading to an integer overflow and heap corruption. These vulnerabilities can potentially allow an attacker to execute arbitrary code.

Vulnerability Detail

The vulnerability, identified as CVE-2017-1000158, affects Python 2.7. It stems from an integer overflow and heap corruption caused by the mishandling of large strings with escaped characters. This flaw can be exploited by an attacker to execute arbitrary code on a vulnerable system. The impact of this vulnerability can be severe, as it allows unauthorized execution of code, potentially leading to unauthorized access, data breaches, or system compromise.

How To Fix

Minimum fixed version

2.7.3-6+deb7u4

This is the first release that contains the fix.

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

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

Workaround

There is no specific workaround mentioned for this vulnerability. The recommended course of action is to apply the provided security update to the python2.7 package.

Conclusion

In conclusion, Python 2.7 versions 2.6 and 2.7 are vulnerable to an integer overflow and heap corruption issue. This vulnerability, identified as CVE-2017-1000158, can allow an attacker to execute arbitrary code on a vulnerable system. To mitigate this vulnerability, it is crucial to upgrade the python2.7 package to version 2.7.3-6+deb7u4 or later. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for python2.7 →

Share this vulnerability

FAQ

This vulnerability allows an attacker to execute arbitrary code on a vulnerable system, potentially leading to unauthorized access, data breaches, or system compromise.

The vulnerability affects CPython versions 2.6 and 2.7.

To fix this vulnerability, upgrade the python2.7 package to version 2.7.3-6+deb7u4 or later.

No specific workaround is mentioned. It is recommended to apply the provided security update.

You can find more information about Debian LTS security advisories, including how to apply updates and frequently asked questions, at https://wiki.debian.org/LTS.

Related vulnerabilities

Recent vulnerabilities recorded for python2.7.

How To Fix

Minimum fixed version

2.7.3-6+deb7u4

This is the first release that contains the fix.

sudo apt-get install --only-upgrade python2.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