python: Heap-Buffer-Overflow and Heap-Use-After-Free in Objects/fileobject.c
Published Feb 8, 2018
3.6
LOWCVSS 3.1
EPSS 1.19%
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.
Affected products
No data.
Configuration 2
- 12.04
- 14.04
- 16.04
- 18.04
No data.
Red Hat Enterprise Linux 5
python
Will not fix
Red Hat Enterprise Linux 6
python
Will not fix
Red Hat Enterprise Linux 7
python
Will not fix
Red Hat Software Collections
python27-python
Will not fix
Red Hat Software Collections
rh-python34-python
Not affected
Red Hat Software Collections
rh-python35-python
Not affected
Red Hat Software Collections
rh-python36-python
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 5 | python | Will not fix | n/a |
| Red Hat Enterprise Linux 6 | python | Will not fix | n/a |
| Red Hat Enterprise Linux 7 | python | Will not fix | n/a |
| Red Hat Software Collections | python27-python | Will not fix | n/a |
| Red Hat Software Collections | rh-python34-python | Not affected | n/a |
| Red Hat Software Collections | rh-python35-python | Not affected | n/a |
| Red Hat Software Collections | rh-python36-python | Not affected | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
Versions of Python 2 included in Red Hat Enterprise Linux 6 and 7 are affected by this issue. Reading concurrently from the same file handle in multiple threads is inherently unstable, and should not be relied upon in any real program. This issue is not planned to be fixed in future releases. This CVE assignment was disputed by upstream. While an attack is theoretically possible, it relies on a programming pattern in the vulnerable Python program that is generally considered bad practice if not an outright bug.
Metrics
No CVSS v4.0 score for this CVE.
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:L
CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:L
AV:L/AC:M/Au:N/C:P/I:N/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 2, 2026.
Score over time
2021–2026- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (19 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 2, 2026 | 1.19% (0.01186) | 66.76th | v5 (v2026.06.15) |
| Jun 15, 2026 | 1.23% (0.01228) | 64.84th | v5 (v2026.06.15) |
| Mar 30, 2025 | 1.29% (0.01294) | 77.85th | v4 (v2025.03.14) |
| Mar 29, 2025 | 2.61% (0.02615) | 76.07th | v4 (v2025.03.14) |
| Mar 28, 2025 | 1.29% (0.01294) | 77.86th | v4 (v2025.03.14) |
| Mar 27, 2025 | 2.61% (0.02615) | 83.84th | v4 (v2025.03.14) |
| Mar 20, 2025 | 0.77% (0.00774) | 71.42th | v4 (v2025.03.14) |
| Mar 19, 2025 | 2.61% (0.02615) | 84.00th | v4 (v2025.03.14) |
| Mar 17, 2025 | 1.29% (0.01294) | 78.30th | v4 (v2025.03.14) |
| Dec 12, 2024 | 0.07% (0.00075) | 34.43th | v3 (v2023.03.01) |
| Jun 14, 2024 | 0.07% (0.00075) | 32.42th | v3 (v2023.03.01) |
| Mar 7, 2023 | 0.07% (0.00075) | 30.41th | v3 (v2023.03.01) |
| Mar 6, 2023 | 3.09% (0.03090) | 83.77th | v2 (v2022.01.01) |
| Apr 1, 2022 | 3.09% (0.03090) | 82.11th | v2 (v2022.01.01) |
| Feb 4, 2022 | 3.09% (0.03090) | 64.78th | v2 (v2022.01.01) |
| Feb 3, 2022 | 5.82% (0.05819) | 80.57th | v1 |
| Jan 6, 2022 | 5.82% (0.05819) | 80.37th | v1 |
| Sep 1, 2021 | 5.82% (0.05819) | 89.04th | v1 |
| Apr 14, 2021 | 5.82% (0.05819) | 0.00th | v1 |
References (11)
- https://access.redhat.com/security/cve/CVE-2018-1000030 Vendor Advisory
- https://bugs.python.org/issue31530 x_refsource_CONFIRMIssue TrackingPatchVendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1541558 Issue Tracking
- https://drive.google.com/file/d/1oyR9DAZjZK_SCn3mor6NRAYLJS6ueXaY/view x_refsource_MISCThird Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2018-1000030
- https://security.gentoo.org/glsa/201811-02 vendor-advisoryx_refsource_GENTOOThird Party Advisory
- https://usn.ubuntu.com/3817-1/ vendor-advisoryx_refsource_UBUNTUThird Party Advisory
- https://usn.ubuntu.com/3817-2/ vendor-advisoryx_refsource_UBUNTUThird Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2018-1000030
- https://www.dropbox.com/sh/sj3ee7xv55j36k7/AADwP-YfOYikBMuy32e0uvPFa?dl=0 x_refsource_MISCPermissions Required
- https://www.oracle.com/security-alerts/cpujan2020.html x_refsource_MISCThird Party Advisory
| Link | Providers | Tags |
|---|---|---|
| https://access.redhat.com/security/cve/CVE-2018-1000030 | Vendor Advisory | |
| https://bugs.python.org/issue31530 | x_refsource_CONFIRMIssue TrackingPatchVendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=1541558 | Issue Tracking | |
| https://drive.google.com/file/d/1oyR9DAZjZK_SCn3mor6NRAYLJS6ueXaY/view | x_refsource_MISCThird Party Advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2018-1000030 | ||
| https://security.gentoo.org/glsa/201811-02 | vendor-advisoryx_refsource_GENTOOThird Party Advisory | |
| https://usn.ubuntu.com/3817-1/ | vendor-advisoryx_refsource_UBUNTUThird Party Advisory | |
| https://usn.ubuntu.com/3817-2/ | vendor-advisoryx_refsource_UBUNTUThird Party Advisory | |
| https://www.cve.org/CVERecord?id=CVE-2018-1000030 | ||
| https://www.dropbox.com/sh/sj3ee7xv55j36k7/AADwP-YfOYikBMuy32e0uvPFa?dl=0 | x_refsource_MISCPermissions Required | |
| https://www.oracle.com/security-alerts/cpujan2020.html | x_refsource_MISCThird Party Advisory |
Change history (0)
No recorded changes yet.