First published: Tue Nov 01 2011(Updated: )
Julian Wälde and Alexander Klink reported a flaw in the hash function used in the implementation of the Python dictionaries (associative arrays). A specially-crafted set of keys could trigger hash function collisions, which degrade dictionary performance by changing hash table operations complexity from an expected/average O(1) to the worst case O(n). Reporters were able to find colliding strings efficiently using meet in the middle attack. As various web application frameworks for Python automatically pre-fill certain dictionaries with data from the HTTP request (such as GET or POST parameters) for Python web application, a remote attacker could use this flaw to make Python interpreter use excessive amount of CPU time by sending a POST request with large amount of parameters which hash to the same value. This problem is similar to the issue that was previously reported for and fixed in e.g. perl: <a href="http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf">http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf</a>
Affected Software | Affected Version | How to fix |
---|---|---|
CPython |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The severity of REDHAT-BUG-750555 is considered moderate due to potential performance degradation caused by hash collisions.
To fix REDHAT-BUG-750555, update to the latest version of Python that addresses the vulnerability.
Symptoms of REDHAT-BUG-750555 may include significant slowdowns in dictionary operations when using specially-crafted keys.
Users of Python software, particularly those utilizing dictionaries in their applications, are affected by REDHAT-BUG-750555.
REDAHT-BUG-750555 was disclosed by Julian Wälde and Alexander Klink, highlighting vulnerabilities related to dictionary hashing in Python.