SUMMARY: insufficient entropy in PRNG initialization procedure in 'elliptic-php' library (
https://github.com/simplito/elliptic-php) can lead to leakage of keys. Users SHOULD IMMEDIATELY MOVE FUNDS from wallets, generated by this library or its forks.
DETAILS: Vulnerability contains in fallback implementation of random_int function in file
https://github.com/simplito/elliptic-php/blob/master/lib/Utils.php if (!function_exists("random_int")) { function random_int($a, $b) { return rand($a, $b); } }
random_int function is used to initialize HMAC DRBG, which is used directly to generate private keys. When library executed on old versions of PHP, where random_int function is not implemented, it substituted by insecure rand/mt_rand PHP built-in functions. Since rand/mt_rand PRNGs have only 32 bits of initial entropy, attacker can predict initial state of HMAC DRBG and regenerate all sequence of private keys.
Today confirmed that BTC, ETH, BNB and TRX chains are affected. But this vulnerability need to further research.