Lucene search

K
redhatcveRedhat.comRH:CVE-2020-14422
HistoryJul 08, 2020 - 1:26 p.m.

CVE-2020-14422

2020-07-0813:26:20
redhat.com
access.redhat.com
9

0.01 Low

EPSS

Percentile

83.8%

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.

Mitigation

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)))