Prevent Hash DoS in python
$ export PYTHONHASHSEED=random Makes hashes of types unpredictable across #python invocations, making your app more secure to DOS attacks.
— Anand B Pillai (@pythonhacker) September 5, 2013
Python and Ruby are partially vulnerable, depending on version or whether the server running the code is a 32 bit or 64 bit machine. Python 2 by default does not provide random value for PYTHONHASHSEED  though it’s behaviour is changed in python 3  which means it has random as it default value.