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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 11 | python2.7 | 2.7.14-5 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python | 2.7.18-8.1 | openSUSE-SU-2024:11202-1 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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.
GitHub 1 repository
-
tylepr96/CVE-2018-1000030 ★ 1 · Feb 10, 2020
Python 2.7.14 race condition UAF proof-of-concept
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 4
- USN-3817-1 python2.7, python3.4, python3.5 vulnerabilities Ubuntu Security Notices (USN) · Apr 22, 2026
- SUSE-SU-2018:1372-1 Security update for python SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:11202-1 python-2.7.18-8.1 on GA media SUSE / openSUSE Security Updates · May 7, 2025
- SUSE-SU-2020:0234-1 Security update for python SUSE / openSUSE Security Updates · May 2, 2025
References
- https://drive.google.com/file/d/1oyR9DAZjZK_SCn3mor6NRAYLJS6ueXaY/view
- USN-3817-2 vendor-advisory
- GLSA-201811-02 vendor-advisory
- https://www.dropbox.com/sh/sj3ee7xv55j36k7/AADwP-YfOYikBMuy32e0uvPFa?dl=0
- USN-3817-1 vendor-advisory
- https://bugs.python.org/issue31530
- https://www.oracle.com/security-alerts/cpujan2020.html