Remix.run Logo
▲ PyWoody an hour ago

  2026-10-02 13:17:45 UTC - The actor scanned and began exploitation against the HFS server. Each POST to the HFS loginSrp1 endpoint returns a new signed session cookie containing a “sid” value drawn from JavaScript’s Math.random() function. Through conducting several logins in succession, the actor collected enough output to reconstruct the internal state of the V8 PRNG algorithm, and thus recover an HFS session-cookie signing key, then forge a signed admin session cookie. This allows the attacker to login as admin without a password.
I cannot believe this is still an issue. I remember mucking around with this vector on Burp Suite a decade ago.
▲ThePhysicist 39 minutes ago | parent [-]

It's such a simple mistake that you and LLM review can miss if not specifically looking for it, especially if it's in a dependency. Lots of folks don't know that Math.random() is insecure and they should be using Crypto.getRandomValue(), it's mostly bad language design, from an age where security was just an afterthought even more so than today. For LLMs it's trivial to find such instances.

That said any good security audit would have turned this up well before the age of LLMs, we were checking for weak RNG values first thing when looking at a new codebase as it was often an easy finding along with e.g. weak hashing algorithms like MD5 or SHA1. I believe a lot of static analysis code scanning tools have rules that flag Math.random() as insecure as well.

▲nsbdhciebsbdhc 20 minutes ago | parent [-]

Let's not forget that crypto.getrandomvalue requires https which can force developers not using local https to use the insecure methods which they inevitably forget to update before shipping, all in the name of security by our great browser overloards and their infinite wisdom.

▲ronsor 5 minutes ago | parent [-]

"http://localhost:*" and "http://\*.localhost:\*" are considered a secure origin, so you don't need HTTPS for it.