cve.bz

CVE-2018-1061 Improper Input Validation

7.5 highEPSS 4.7%

High (7.5). EPSS 4.7% estimated probability of exploitation activity in the next 30 days.

On this page
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 the difflib.IS_LINE_JUNK method. An attacker could use this flaw to cause denial of service.

Severity

CVSS 3.0

7.5 high
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
4.7% (unchanged from 4.7% a week ago; 4.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 92nd percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-10-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-20 Improper Input Validation
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2018-1061 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2018-1061?via=ask-ai-copy and https://cve.bz/cve/CVE-2018-1061?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2018-1061 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
python:pythonbefore 2.7.15
python:pythonfrom 3.0 before 3.4.9
python:pythonfrom 3.5.0 through 3.5.5
python:pythonfrom 3.6 through 3.6.4
python:python3.7.0:alpha1
python:python3.7.0:alpha2
python:python3.7.0:alpha3
python:python3.7.0:alpha4
python:python3.7.0:beta1
python:python3.7.0:beta2
python:python3.7.0:beta3
python:python3.7.0:beta4
python:python3.7.0:beta5
python:python3.7.0:rc1
debian:debian_linux8.0
debian:debian_linux9.0
redhat:ansible_tower3.3
redhat:enterprise_linux_desktop7.0
redhat:enterprise_linux_server7.0
redhat:enterprise_linux_workstation7.0
canonical:ubuntu_linux12.04
canonical:ubuntu_linux14.04
canonical:ubuntu_linux16.04
canonical:ubuntu_linux18.04
fedoraproject:fedora28
fedoraproject:fedora29
fedoraproject:fedora30

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian8python2.72.7.9-2+deb8u2DLA-1519-1
Debian8python3.43.4.2-1+deb8u1DLA-1520-1
Debian9python2.72.7.13-2+deb9u3DSA-4306-1
Debian9python3.53.5.3-1+deb9u1DSA-4307-1
Debian11python2.72.7.14-7DEBIAN-CVE-2018-1061
Ubuntu14.04:LTSpython2.72.7.6-8ubuntu0.5UBUNTU-CVE-2018-1061 USN-3817-1
Ubuntu14.04:LTSpython3.43.4.3-1ubuntu1~14.04.7UBUNTU-CVE-2018-1061 USN-3817-1
Ubuntu16.04:LTSpython2.72.7.12-1ubuntu0~16.04.4UBUNTU-CVE-2018-1061 USN-3817-1
Ubuntu16.04:LTSpython3.53.5.2-2ubuntu0~16.04.5UBUNTU-CVE-2018-1061 USN-3817-1
Ubuntu18.04:LTSpython2.72.7.15~rc1-1ubuntu0.1USN-3817-1
Ubuntu20.04:LTSpython3.83.8.10-0ubuntu1~20.04.10USN-6891-1
Ubuntu22.04:LTSpython3.103.10.12-1~22.04.4USN-6891-1
UbuntuPro:14.04:LTSpython3.53.5.2-2ubuntu0~16.04.4~14.04.1+esm1UBUNTU-CVE-2018-1061 USN-6891-1
UbuntuPro:16.04:LTSpython3.53.5.2-2ubuntu0~16.04.13+esm13USN-6891-1
UbuntuPro:18.04:LTSpython3.63.6.9-1~18.04ubuntu1.13+esm2USN-6891-1
UbuntuPro:18.04:LTSpython3.73.7.5-2ubuntu1~18.04.2+esm3USN-6891-1
UbuntuPro:18.04:LTSpython3.83.8.0-3ubuntu1~18.04.2+esm2USN-6891-1
2 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:7::client, enterprise_linux:7::computenode, enterprise_linux:7::server and 1 morepython, tkinter, python-libs and 5 more0:2.7.5-76.el7RHSA-2018:3041
Red Hatrhel_aus:7.4::server, rhel_e4s:7.4::server, rhel_tus:7.4::serverpython, tkinter, python-libs and 5 more0:2.7.5-63.el7_4RHSA-2020:1346
Red Hatrhel_eus:7.5::computenode, rhel_eus:7.5::serverpython, tkinter, python-libs and 5 more0:2.7.5-74.el7_5RHSA-2020:1268
Red Hatrhel_software_collections:3::el6python27-python, python27-tkinter, python27-python-libs and 5 more0:2.7.16-4.el6RHSA-2019:1260
Red Hatrhel_software_collections:3::el6python27-python-jinja20:2.6-12.el6RHSA-2019:1260
Red Hatrhel_software_collections:3::el6rh-python36-python, rh-python36-python-libs, rh-python36-python-test and 5 more0:3.6.9-2.el6RHSA-2019:3725
Red Hatrhel_software_collections:3::el7python27-python, python27-tkinter, python27-python-libs and 5 more0:2.7.16-4.el7RHSA-2019:1260
Red Hatrhel_software_collections:3::el7python27-python-jinja20:2.6-15.el7RHSA-2019:1260
Red Hatrhel_software_collections:3::el7rh-python36-python, rh-python36-python-libs, rh-python36-python-test and 5 more0:3.6.9-2.el7RHSA-2019:3725
SUSEEnterprise Storage 5python2.7.13-28.16.1SUSE-SU-2018:3554-1
SUSELinux Enterprise Desktop 12 SP3python, python-base2.7.13-28.16.1SUSE-SU-2018:3554-1
SUSELinux Enterprise Desktop 12 SP3, Linux Enterprise Module for Web and Scripting 12, Linux Enterprise Server 12 SP3 and 1 morepython3, python3-base3.4.6-25.16.1SUSE-SU-2018:2696-1
SUSELinux Enterprise Desktop 12 SP4python, python-base2.7.13-28.16.1SUSE-SU-2018:3554-2
SUSELinux Enterprise Module for Basesystem 15, Linux Enterprise Module for Basesystem 15 SP1python3, python3-base3.6.10-3.42.2SUSE-SU-2020:0114-1
SUSELinux Enterprise Module for Basesystem 15, Linux Enterprise Module for Basesystem 15 SP1, Linux Enterprise Module for Desktop Applications 15 and 2 morepython2.7.17-7.32.2SUSE-SU-2020:0234-1
SUSELinux Enterprise Module for Basesystem 15, Linux Enterprise Module for Basesystem 15 SP1, Linux Enterprise Module for Python 2 15 SP1python-base2.7.17-7.32.1SUSE-SU-2020:0234-1
SUSELinux Enterprise Module for Development Tools 15, Linux Enterprise Module for Development Tools 15 SP1python3-base3.6.10-3.42.2SUSE-SU-2020:0114-1
SUSELinux Enterprise Point of Sale 11 SP3, Linux Enterprise Server 11 SP3-LTSS, Linux Enterprise Server 11 SP3-TERADATA and 3 morepython, python-base2.6.9-40.15.1SUSE-SU-2018:2408-1
SUSELinux Enterprise Point of Sale 11 SP3, Linux Enterprise Server 11 SP3-LTSS, Linux Enterprise Server 11 SP3-TERADATA and 3 morepython-doc2.6-8.40.15.1SUSE-SU-2018:2408-1
SUSELinux Enterprise Server 12 SP3, Linux Enterprise Server for SAP Applications 12 SP3python, python-doc, python-base2.7.13-28.16.1SUSE-SU-2018:3554-1
SUSELinux Enterprise Server 12 SP4, Linux Enterprise Server for SAP Applications 12 SP4python, python-doc, python-base2.7.13-28.16.1SUSE-SU-2018:3554-2
3 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.1python3, python3-base3.6.10-lp151.6.7.1openSUSE-SU-2020:0086-1
openSUSETumbleweedpython2.7.18-8.1openSUSE-SU-2024:11202-1
openSUSETumbleweedpython363.6.15-1.1openSUSE-SU-2024:11284-1
Alpinev3.5python33.5.6-r0ALPINE-CVE-2018-1061
Alpinev3.5, v3.6, v3.7 and 4 morepython22.7.15-r0ALPINE-CVE-2018-1061
Alpinev3.6, v3.7python33.6.5-r0ALPINE-CVE-2018-1061
Alpinev3.8python33.6.6-r0ALPINE-CVE-2018-1061
Alpinev3.9, v3.10, v3.11python2, python2-tkinter2.7.15-r0ALPINE-CVE-2018-1061
Azure Linux3python-pyno fix listedAZL-109626

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Moderate.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7python-0:2.7.5-76.el7Fixed 2018-10-30RHSA-2018:3041
Red Hat Enterprise Linux 7.4 Advanced Update Supportpython-0:2.7.5-63.el7_4Fixed 2020-04-07RHSA-2020:1346
Red Hat Enterprise Linux 7.4 Telco Extended Update Supportpython-0:2.7.5-63.el7_4Fixed 2020-04-07RHSA-2020:1346
Red Hat Enterprise Linux 7.4 Update Services for SAP Solutionspython-0:2.7.5-63.el7_4Fixed 2020-04-07RHSA-2020:1346
Red Hat Enterprise Linux 7.5 Extended Update Supportpython-0:2.7.5-74.el7_5Fixed 2020-04-01RHSA-2020:1268
Red Hat Software Collections for Red Hat Enterprise Linux 6python27-python-0:2.7.16-4.el6Fixed 2019-05-22RHSA-2019:1260
Red Hat Software Collections for Red Hat Enterprise Linux 6python27-python-jinja2-0:2.6-12.el6Fixed 2019-05-22RHSA-2019:1260
Red Hat Software Collections for Red Hat Enterprise Linux 6rh-python36-python-0:3.6.9-2.el6Fixed 2019-11-06RHSA-2019:3725
Red Hat Software Collections for Red Hat Enterprise Linux 7python27-python-0:2.7.16-4.el7Fixed 2019-05-22RHSA-2019:1260
Red Hat Software Collections for Red Hat Enterprise Linux 7python27-python-jinja2-0:2.6-15.el7Fixed 2019-05-22RHSA-2019:1260
Red Hat Software Collections for Red Hat Enterprise Linux 7rh-python36-python-0:3.6.9-2.el7Fixed 2019-11-06RHSA-2019:3725
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUSpython27-python-0:2.7.16-4.el7Fixed 2019-05-22RHSA-2019:1260
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUSpython27-python-jinja2-0:2.6-15.el7Fixed 2019-05-22RHSA-2019:1260
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUSpython27-python-0:2.7.16-4.el7Fixed 2019-05-22RHSA-2019:1260
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUSpython27-python-jinja2-0:2.6-15.el7Fixed 2019-05-22RHSA-2019:1260
Red Hat Software Collections for Red Hat Enterprise Linux 7.5 EUSrh-python36-python-0:3.6.9-2.el7Fixed 2019-11-06RHSA-2019:3725
Red Hat Enterprise Linux 5pythonWill not fix
Red Hat Enterprise Linux 6pythonWill not fix
Red Hat Software Collectionsrh-python34-pythonWill not fix
Red Hat Software Collectionsrh-python35-pythonWill not fix
4 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2018-1061.

Attack patterns (CAPEC)

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-20 (51).

References

Check your stackJSON