CVE-2020-14422: Medium severity Python Python vulnerability

Published Jun 18, 2020
·
Updated

A vulnerability was found in Lib/ipaddress.py in Python through 3.8.3 improperly computes hash values in the IPv4Interface and IPv6Interface classes, which might allow a remote attacker to cause a denial of service if an application is affected by the performance of a dictionary containing IPv4Interface or IPv6Interface objects, and this attacker can cause many dictionary entries to be created.

References: https://bugs.python.org/issue41004 https://github.com/python/cpython/pull/20956

Other sources

A vulnerability was found in the way the ipaddress python module computes hash values in the IPv4Interface and IPv6Interface classes. This flaw allows an attacker to create many dictionary entries, due to the performance of a dictionary containing the IPv4Interface or IPv6Interface objects, possibly resulting in a denial of service. The highest threat from this vulnerability is to system availability.

Lib/ipaddress.py in Python through 3.8.3 improperly computes hash values in the IPv4Interface and IPv6Interface classes, which might allow a remote attacker to cause a denial of service if an application is affected by the performance of a dictionary containing IPv4Interface or IPv6Interface objects, and this attacker can cause many dictionary entries to be created. This is fixed in: v3.5.10, v3.5.10rc1; v3.6.12; v3.7.9; v3.8.4, v3.8.4rc1, v3.8.5, v3.8.6, v3.8.6rc1; v3.9.0, v3.9.0b4, v3.9.0b5, v3.9.0rc1, v3.9.0rc2.

Affected Software

22 affected componentsFixes available
redhat/python3<0:3.6.8-18.el7
0:3.6.8-18.el7
redhat/python3<0:3.6.8-31.el8
0:3.6.8-31.el8
redhat/rh-python36-python<0:3.6.12-1.el6
0:3.6.12-1.el6
redhat/rh-python36-python-pip<0:9.0.1-5.el6
0:9.0.1-5.el6
redhat/rh-python36-python-virtualenv<0:15.1.0-3.el6
0:15.1.0-3.el6
redhat/rh-python36-python<0:3.6.12-1.el7
0:3.6.12-1.el7
redhat/rh-python36-python-pip<0:9.0.1-5.el7
0:9.0.1-5.el7
redhat/rh-python36-python-virtualenv<0:15.1.0-3.el7
0:15.1.0-3.el7
redhat/rh-python38-python<0:3.8.6-1.el7
0:3.8.6-1.el7
redhat/rh-python38-python-psutil<0:5.6.4-5.el7
0:5.6.4-5.el7
redhat/rh-python38-python-urllib3<0:1.25.7-6.el7
0:1.25.7-6.el7
debian/python-ipaddress<=1.0.23-1
debian/python2.7
2.7.18-8+deb11u1
Python Python>=3.0.0<3.5.10
Python Python>=3.6.0<3.6.12
Python Python>=3.7.0<3.7.9
Python Python>=3.8.0<3.8.4
openSUSE Leap=15.1
openSUSE Leap=15.2
Fedoraproject Fedora=31
Fedoraproject Fedora=32
Oracle Enterprise Manager Ops Center=12.4.0.0

Remediation

Information

As a short term solution, if your application is using the IPv4Interface/IPv6Interface classes as keys of a dictionary, it is possible to patch the __hash__ method of those classes to not be constant. ``` IPv4Interface.__hash__ = lambda self: hash((self._ip, self._prefixlen, int(self.network.network_address))) IPv6Interface.__hash__ = lambda self: hash((self._ip, self._prefixlen, int(self.network.network_address))) ```

Event History

Jun 18, 2020
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Jul 8, 2020
Data Sourced
via Red Hat·12:52 PM
DescriptionSeverityAffected Software
Nov 29, 2025
Data Sourced
via Ubuntu·09:43 PM
RemedyDescriptionSeverityAffected Software
Feb 21, 2026
Data Sourced
via Launchpad·12:13 AM
Description

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the vulnerability ID for this issue?

The vulnerability ID for this issue is CVE-2020-14422.

2

What is the severity of CVE-2020-14422?

The severity of CVE-2020-14422 is medium with a CVSS score of 5.9.

3

Which versions of Python are affected by this vulnerability?

Python versions up to and including 3.8.3 are affected by this vulnerability.

4

How does this vulnerability impact applications?

This vulnerability could allow a remote attacker to cause a denial of service if an application is affected by the performance of a dictionary containing IPv4Interface or IPv6Interface objects.

5

Are there any references for this vulnerability?

Yes, you can find more information about this vulnerability at the following references: [1], [2], [3].

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203