First published: Thu 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: <a href="https://bugs.python.org/issue41004">https://bugs.python.org/issue41004</a> <a href="https://github.com/python/cpython/pull/20956">https://github.com/python/cpython/pull/20956</a>
Credit: cve@mitre.org cve@mitre.org
Affected Software | Affected Version | How to fix |
---|---|---|
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 |
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 | |
debian/python-ipaddress | <=1.0.23-1 | |
debian/python2.7 | 2.7.18-8+deb11u1 |
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))) ```
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
(Appears in the following advisories)
The vulnerability ID for this issue is CVE-2020-14422.
The severity of CVE-2020-14422 is medium with a CVSS score of 5.9.
Python versions up to and including 3.8.3 are affected by this vulnerability.
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.
Yes, you can find more information about this vulnerability at the following references: [1], [2], [3].