December 1, 2026
Math.random() Signed the Admin Cookie: Inside the Rejetto HFS Flaw Attackers Are Already Exploiting
A file serverβs job is to hand files to people who ask for them. It is not supposed to hand them the keys to the whole server as well. Yetβ¦
By Mishfahkhan
6 min read
Math.random() Signed the Admin Cookie: Inside the Rejetto HFS Flaw Attackers Are Already Exploiting
A file server's job is to hand files to people who ask for them. It is not supposed to hand them the keys to the whole server as well. Yet that is exactly what Rejetto HTTP File Server did for every version from 3.0.0 to 3.2.0: it signed its administrator session cookies with a secret derived from JavaScript's Math.random(), a function that was never designed to keep secrets, and then it helpfully leaked the random numbers to anyone who asked. No password was needed. No account, no phishing email, no user clicking anything. A few ordinary login attempts were enough for an attacker to reconstruct the secret, forge an administrator cookie, and run code on the server. The flaw is CVE-2026β61500, it scores 9.8 out of 10, and on 30 November 2026 CISA added it to its Known Exploited Vulnerabilities catalog β the government's list of flaws that attackers are actively using right now. Federal agencies have until 3 December to patch it. That is two days from today.
What happened
On 30 November 2026, CISA added two vulnerabilities to the KEV catalog based on evidence of active exploitation. The headline one is CVE-2026β61500 in Rejetto HTTP File Server (HFS), a popular free, open-source file-sharing server for Windows, Linux and macOS. The second is CVE-2026β125160 in TYPO3 CMS, a quieter information-disclosure flaw that is also being exploited in the wild. Both had fixes available long before CISA's announcement β which is precisely the point of the story.
The flaw was fixed on 13 July 2026 in HFS 3.2.1. The CVE record, published by VulnCheck as the numbering authority, describes it in a single damning sentence: HFS derived its session-cookie signing key from the non-cryptographic Math.random() generator and disclosed outputs of the same generator to unauthenticated clients during login. It was discovered by Anthropic's Mythos AI agent and reported by researchers at Horizon3. VulnCheck's detection network began observing exploitation on 1 October 2026, and GreyNoise documented one takeover on 2 October: an attacker scanned an unpatched server, collected login responses, reconstructed the signing key, forged an admin cookie, and turned the server into a relay for stolen data. The server had not been patched.
There is a detail worth noting about the fix itself. Version 3.2.1 was a security release that addressed six vulnerabilities at once, CVE-2026β61500 through CVE-2026β61505, all of which could allow administrative access on unpatched servers. Anyone still running HFS 3.0.0 to 3.2.0 is exposed to all of them, not just the one CISA listed. The current stable release is 3.4.2, published on 24 November 2026.
How the attack works
To understand the flaw, you need to know two things: how HFS sessions work, and why Math.random() is the wrong tool for making secrets.
HFS 3.x is a rewrite in TypeScript and Node.js, built on the Koa web framework. Like most web applications, it keeps users logged in with a signed session cookie: the server signs a small piece of data with a secret key, and anyone presenting a cookie with a valid signature is treated as logged in. The security of the whole scheme rests on one assumption β that nobody except the server knows the signing key. In HFS 3.0.0 through 3.2.0, that assumption was false from the start: the signing key was derived from Math.random(), JavaScript's built-in random function. It is fine for shuffling a playlist, but it is not a source of secrets β under the hood, the V8 engine generates its values with an algorithm called xorshift128+, and if you observe enough outputs, you can reconstruct the generator's entire internal state and predict every "random" number it will ever produce, including the one used as the cookie-signing key.
And HFS made the observation step trivial. During the unauthenticated login handshake, the server returned session cookies containing identifier values drawn from that very same Math.random() instance. An attacker needed nothing more than a handful of ordinary login attempts: each response handed over another output of the generator. With those values, a solver β researchers used the Z3 theorem prover β reconstructed the V8 generator's state, recovered the signing key, and forged a perfectly valid administrator session cookie. No credentials were guessed and no password was cracked β the server simply told the attacker everything required to impersonate its own administrator.
Once inside as an administrator, the attacker did not have to stop at browsing shared folders. HFS includes a documented server_code configuration feature that lets administrators define custom endpoints running server-side code. An attacker holding a forged admin cookie can use that feature to execute arbitrary code on the host. That is the full chain: predictable randomness, to forged session, to remote code execution β all without authentication.
The TYPO3 flaw added the same day is a different shape of problem, but the same lesson about small leaks. CVE-2026β125160 sits in the Form Framework extension (ext:form) of TYPO3 CMS. When a form upload fails, the error message discloses sensitive information β the storage paths of uploaded files. An unauthenticated attacker can use that to work out the public URL of files they uploaded, and under some configurations that leads to cross-site scripting. It scores a modest 6.3 β which is exactly why it matters: CISA does not add a medium-severity information disclosure to the exploited list unless attackers are genuinely using it. TYPO3's own advisory, TYPO3-CORE-SA-2026β029 from 17 November 2026, states plainly that the flaw is known to be actively exploited.
Who is affected
For Rejetto HFS, the test is simple: if you run HFS 3.0.0 through 3.2.0, you are vulnerable, and if the server is reachable from the internet, you are exposed. HFS is easy to install, so it ends up everywhere β small businesses sharing files, home labs, developers passing builds around, departments that needed a file server ten minutes ago. Many of those installations were set up once and forgotten, which is why a fix released in July is still being exploited in December.
For TYPO3, the affected versions span five major branches: 10.0.0 to 10.4.62, 11.0.0 to 11.5.56, 12.0.0 to 12.4.51, 13.0.0 to 13.4.39, and 14.0.0 to 14.3.11. The fixes are 10.4.63 (ELTS), 11.5.57 (ELTS), 12.4.52 (ELTS), 13.4.40 (LTS) and 14.3.12 (LTS). TYPO3 powers a large number of government, university and corporate sites in Europe in particular, so the exposure is broad even though the severity score is not.
Both flaws share the same uncomfortable timeline. The fixes were available weeks or months before the attacks were confirmed. The gap was not a missing patch β it was unpatched servers.
What to do right now
- Update Rejetto HFS to 3.2.1 or later β today, not this week. The CISA deadline for federal agencies is 3 December 2026, and exploitation is already happening. The current stable release is 3.4.2. Any version from 3.0.0 to 3.2.0 must go.
- Update TYPO3 to a fixed release. Install 13.4.40, 14.3.12, or the matching ELTS release for older branches (10.4.63, 11.5.57, 12.4.52). The CISA deadline is 14 December 2026, but the flaw is already being exploited, so do not wait for the deadline.
- Do not expose a file server you have not patched. Until the update is installed, take HFS off the public internet or restrict access to trusted networks only. An attacker cannot forge a session on a server they cannot reach.
- Assume unpatched servers are already compromised. If your HFS server ran a vulnerable version while exposed, check for signs of intrusion before you patch and move on: unexpected administrator sessions, new server_code endpoints or configuration changes, unfamiliar files in shared folders, and outbound connections to unknown hosts. Patching closes the hole; it does not evict an attacker who is already inside. Rotate the server's secrets and credentials as well.
- Audit your own code for Math.random() in security paths. This is the cheapest lesson in the whole story. Search your projects for Math.random() anywhere near tokens, session keys, password resets, or one-time codes. In Node.js, use crypto.randomBytes(); in the browser, use crypto.getRandomValues(). A random function that can be predicted is not random β it is a password written on the wall.
The bigger picture
Two things make this pair of KEV additions worth more than a patch notice. The first is the clock. CISA's additions land days before 7 December 2026, when Binding Operational Directive 26β04 β the agency's risk-based overhaul of federal patching β reaches full enforcement. The new model asks whether a flaw is actually being exploited and whether it hands over total control, and both of these flaws answer yes. The message for everyone else is the same: patch what attackers are using, first, and stop treating a medium severity score as a reason to wait. TYPO3's 6.3 is being exploited today; plenty of 9.8s are not.
The second is the discoverer. CVE-2026β61500 was found by an AI agent β Anthropic's Mythos β and yesterday's NFS2ROOT flaw was found in part by an AI research harness too. The tools are getting faster, and the window between disclosure and exploitation is shrinking with them: this flaw went from fix, to observed exploitation, to CISA listing in under five months. The patch has been sitting there since July. The only question is whether the people running the servers go and get it before 3 December β or after someone else gets in.
Sources: CISA KEV catalog addition (30 Nov 2026); VulnCheck CVE record for CVE-2026β61500; Horizon3 / VulnCheck reporting on HFS exploitation (Oct 2026); GreyNoise takeover timeline (2 Oct 2026); TYPO3 security advisory TYPO3-CORE-SA-2026β029 (17 Nov 2026); Rejetto HFS 3.2.1 release notes (13 Jul 2026).