NPM UUID's random number gen contains shared mutable state bug since 3 weeks

  • Posted 2 hours ago by jbverschoor
  • 2 points
(copied from the other thread)

Changed 3 weeks ago:

uuid/src/rng.ts : the random array is const. Every call will share the same random number. Subsequent call will update your old random code, so if you generated something important... good luck

The old code used to do a slice() which creates a new copy.

https://github.com/uuidjs/uuid/blob/e1f42a354593093ba0479f0b... became

https://github.com/uuidjs/uuid/blob/f2c235f93059325fa43e1106...

Welp.. time to patch and update everything again. Another day, another npm-package headache. Very odd()

Attack vector: call the rng(), and send the result somewhere. You now have now overwritten someone else's "random number" and know about it. The fun things you can do with those numbers!

2 comments

    Loading..
    Loading..