Hacker Newsnew | past | comments | ask | show | jobs | submit | PyWoody's commentslogin

  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.

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.


Sounds like if you’re building a security critical part (login) of a security critical server this should not be “easy to miss”. It should be the bread and butter of the person doing it.

"should"

It should be, but rarely is.

I don’t think any LLM would miss the use of Math.random where a cryptographic random should be used. Then again, I don’t think I know any programmers that would miss it. It’s not some advanced concept. It’s security 101 stuff.

I had code using math.random() to generate passwords introduced into my codebase, written by opus 4.6 in Febuary 2026, and not found until November 2026

Lots of old examples of code using Math.random() in the training data, probably more than Crypto.getRandomValue, given that Math.random has been around a lot longer.

You can try and train it out afterwards but there’ll always be a part of the model that wants to write everything with Math.random because so many people did in the past


Opus 5.5 has specifically not used Math.random() on Typescript projects I've done.

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.

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

I think it was true that you needed local https at one point (I vaguely remember setting it up once) but yes it no longer is

They are using nodejs, not a browser to handle server side POST requests.

BTW, a way to fix it is to create your own "localhost" name and issue a certificate for it. Then just commit it into your code repository.

I used to do that once every 3 years with a "regular" SSL provider. Unfortunately, now the longest period is 200 days. I'll have to set up Let's Encrypt automation for it eventually :(


I mean depending on what you're doing you should be able to set up your own local CA and put the root cert on your internal devices and get certs as long as you want.

Local CAs are a pain in the ass to maintain, and they are a huge vulnerability. If your CA private keys leak, your devices can be MITM-ed.

It pops up in all kinds of places, like CI/CD runs or automated tests.


Hence you build your certs on an offline laptop.

Hey! So do I but you needed the paid version to get enough attempts to get enough data iirc


The repo 404s for me now. It was working a few minutes ago, and now it doesn't.

Leonida is old news. It was at 25% completion.

Stay up to date at https://portwatch-vi.xyz/ . The current leader is https://github.com/ivall/xcl with 55% completion.

There are 27 separate people/groups competing (not counting Leonida since it's out of the running).

Note that the percentages are quite arbitrary.


lmao all of these projects are still, even after the leonida takedown ... pushing to github. incredible.

that same DMCA (which microsoft is clearly happy to comply with) is going to be issued for all of these. i just saw a PR closed on one of them to remove the game name. lol that, my friend, is futile



Lol Cloudflare error page

How convenient, right?

Opening that tab and just letting it run is wild. The coordination is genuinely impressive.

What are the odds that they single handedly take down Github today? 10-1? 1-1?


it's down right now, unrelated to this project, but funny regardless.

It's a pretty common complaint among NFL fans.

Don't even put that into the ether.


Wow, that video made me instantly nauseous.


If you'd like a somewhat more sedate example: https://youtu.be/J1-yToxKOzI

Their LazyPosy channel has a video about how they made this one, difficulties, etc if you're interested in that too. More practical than technical, though it wasn't done with Blender.


It's hip to be square.


https://wallhop.io/ is still pretty reliable, for me at least.


  - NH gets nearly 2/3 of its revenue from property taxes
No sales or income tax will get you that. I sold my house and went back to renting because my town doubled my already ludicrously high property taxes.


Won't you still be (indirectly) paying property tax, as your landlord needs to recoup?


Landlords are price takers. They respond to the market by setting rent at the highest anyone will pay them. Of course they might decide to sell, but if they dont then they cant just raise rent whenever they face a supply shock.


Yes but you can get below market rents from owners who don’t have a mortgage to pay.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: