sockjs / sockjs-client

WebSocket emulation - Javascript client
MIT License
8.45k stars 1.3k forks source link

Vulnerability issue on Math.random() - Fortify Priority: High #647

Open francescaProject opened 9 months ago

francescaProject commented 9 months ago

The random number generator implemented by random() cannot withstand a cryptographic attack. In this case, the function that generates weak random numbers is random() in sockjs.js on line 3607.

return Math.floor(Math.random() * max);