Skip to content
OpenAdvisories
Low · 3.6 Public exploit CVE-2018-1000030 EUVD-2018-1791GHSA-rwj4-fxr5-gh64

Python 2.7.14 is vulnerable to a Heap-Buffer-Overflow as well as a Heap-Use-After-Free. Python versions prior to 2.7.14 may also be vulnera…

Published Feb 8, 2018 · Updated Oct 8, 2026 · Assigned by mitre

Description

Python 2.7.14 is vulnerable to a Heap-Buffer-Overflow as well as a Heap-Use-After-Free. Python versions prior to 2.7.14 may also be vulnerable and it appears that Python 2.7.17 and prior may also be vulnerable however this has not been confirmed. The vulnerability lies when multiply threads are handling large amounts of data. In both cases there is essentially a race condition that occurs. For the Heap-Buffer-Overflow, Thread 2 is creating the size for a buffer, but Thread1 is already writing to the buffer without knowing how much to write. So when a large amount of data is being processed, it is very easy to cause memory corruption using a Heap-Buffer-Overflow. As for the Use-After-Free, Thread3->Malloc->Thread1->Free's->Thread2-Re-uses-Free'd Memory. The PSRT has stated that this is not a security vulnerability due to the fact that the attacker must be able to run code, however in some situations, such as function as a service, this vulnerability can potentially be used by an attacker to violate a trust boundary, as such the DWF feels this issue deserves a CVE.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 11 python2.7 2.7.14-5 —
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS python2.7 2.7.15~rc1-1ubuntu0.1 USN-3817-1
Ubuntu 16.04 LTS python2.7 2.7.12-1ubuntu0~16.04.4 USN-3817-1
Ubuntu 16.04 LTS python3.5 3.5.2-2ubuntu0~16.04.5 USN-3817-1
Ubuntu 14.04 LTS python2.7 2.7.6-8ubuntu0.5 USN-3817-1
Ubuntu 14.04 LTS python3.4 3.4.3-1ubuntu1~14.04.7 USN-3817-1
ReleasePackageFixed inAdvisory
SLES 15 SP1 python 2.7.17-7.32.2 SUSE-SU-2020:0234-1
SLES 15 SP1 python-base 2.7.17-7.32.1 SUSE-SU-2020:0234-1
SLES 15 python 2.7.17-7.32.2 SUSE-SU-2020:0234-1
SLES 15 python-base 2.7.17-7.32.1 SUSE-SU-2020:0234-1
SLES 12 SP3 python +1 2.7.13-28.3.2 SUSE-SU-2018:1372-1
SLES 12 SP3 python-doc 2.7.13-28.3.3 SUSE-SU-2018:1372-1
SLES 2 python 2.7.17-7.32.2 SUSE-SU-2020:0234-1
SLES 2 python-base 2.7.17-7.32.1 SUSE-SU-2020:0234-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 12 SP3 python +1 2.7.13-28.3.2 SUSE-SU-2018:1372-1
SLES for SAP 12 SP3 python-doc 2.7.13-28.3.3 SUSE-SU-2018:1372-1
SUSE Enterprise Storage 5 python 2.7.13-28.3.2 SUSE-SU-2018:1372-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python 2.7.18-8.1 openSUSE-SU-2024:11202-1

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python-py No fix yet —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 4

References