tl;dr: the algorithm powering V8&#x27;s Math.random() is very poor quality. For many use cases you can&#x27;t safely pretend its output is actually random. Don&#x27;t use it for anything non-trivial that you care about. It should probably be fixed. In the meantime, use crypto.randomBytes() or crypto.getRandomValues() instead.