>>FIRST MISSION//LOGS//cybersecurity//a-signed-cookie-is-not-a-secret-cookie.MD
[ + ] TARGET_LOCKED200 OK
DEC 02, 2026timer 3 MIN READSYS_TAG: cybersecurity STATUS: VERIFIED_WORKING

A Signed Cookie Is Not a Secret Cookie

CVE-2026-61500 signs Rejetto HFS session cookies with a key built from Math.random(), then hands the same generator's output to anyone who starts a login. Twelve requests and Z3 recover the key. CISA added it to KEV with a December 3 deadline and a forensic triage flag.

ENGINE: KERNEL // STABLE
BASE_ARCH: x86_64
HOST: VASTORIGINS.COM
GPG: OKSIG_ID: 0x4EB27DB0

I have a rule about session cookies that I picked up from reading other people’s incident reports: if the server puts data in the cookie, assume the client can read it. Signing is about tampering. It has never been about secrecy.

CVE-2026-61500 in Rejetto HTTP File Server is that rule turned into a working exploit. The session-cookie signing key comes from JavaScript’s Math.random(), and the same generator’s output goes back to unauthenticated clients during login. CISA added it to the Known Exploited Vulnerabilities catalog on November 30, with a deadline that lands tomorrow and a forensic triage requirement attached. The fixed release, HFS 3.2.1, came out on July 13.

🧩 The Record, Before the Story

The CVE record is blunt for once. HFS 3.0.0 through 3.2.0 derives its session-cookie signing key from Math.random() and discloses outputs of the same generator to unauthenticated clients during login. An attacker collects a small number of login responses, reconstructs the generator’s state, recovers the signing key, forges an administrator session cookie, and executes code through the server_code configuration feature.

VulnCheck is the CNA. It scores the bug 9.3 on CVSS 4.0 and 9.8 on CVSS 3.1, both critical, AV:N with no privileges and no user interaction. NVD marks the record analyzed but carries only VulnCheck’s secondary metrics, so there is no independent NVD score to compare against. EPSS read 5.98 percent on December 1, 93rd percentile.

The KEV entry is the part worth reading closely. CISA did not just list it as exploited. It listed it with the forensic triage requirement, the flag BOD 26-04 uses when an agency has to check whether the box was compromised before the patch went on. For a bug whose entire exploit is “present a valid session cookie,” that flag is the whole point.

🔑 The Key and the Leak Were the Same Stream

HFS 3.x is a TypeScript rewrite running on Node with Koa. Koa signs cookies with keygrip, and keygrip wants a key. If COOKIE_SIGN_KEYS is unset, which is the default, HFS builds one at startup:

const keys = process.env.COOKIE_SIGN_KEYS?.split(',')
    || [randomId(30)] // randomness at start gives some extra security

randomId is Math.random().toString(36) in a loop, and randomId(30) consumes exactly three consecutive outputs. In V8, Math.random() is xorshift128+, which is fast, deterministic, and invertible. The outputs are not a secret stream. They are a state you can walk backwards from enough observations.

Which is where the second line comes in. During the first step of the SRP login handshake, HFS generated a session identifier the same way:

const sid = Math.random()

and stored it in ctx.session.loggingIn. koa-session keeps the session in the cookie as base64 JSON, signed but not encrypted. So every unauthenticated POST to loginSrp1 returned a cookie the client could decode, and inside it was the exact 52-bit double. You did not need a password. You needed a username that exists, and the built-in admin account will do.

Twelve requests later you have twelve consecutive doubles. Feed them to Z3 as constraints, recover the xorshift128+ state, step it backwards to the three outputs consumed when the process started, and you have the signing key. Horizon3 verified each candidate key against the HMAC on a cookie they had legitimately been given, which is a free offline oracle. Then you sign your own session: {username: 'admin', ts: now, allow_session_ip_change: true}, the field that defeats IP binding because you are the one doing the signing. admin_net defaults to empty, so there is no network restriction to satisfy either.

Horizon3’s Zach Hanley published this on September 30, and the write-up is candid that the chain came out of an agent harness running Anthropic’s Mythos model, with a second agent re-checking the finding against the source. The CVE credits Hanley “in collaboration with Claude and Anthropic Research.” I have written about that pipeline before. What matters here is that the model proposed Z3 for the state recovery, the step most researchers skip because it is expensive.

🧱 The Other Half Was a Feature

An authentication bypass needs somewhere to go, and HFS has a big somewhere. Its admin API supports custom endpoints and middleware hooks that run server-side JavaScript. That is not a bug. It is the product’s extension mechanism, documented and intended.

So admin is code execution. The attacker does not need memory corruption or a second vulnerability. They add an endpoint that runs a command, or a hook that fires on every request, and the file server becomes a shell. GreyNoise watched the GT13 actor do exactly that: middleware hooks to append an SSH key, then server_code to try to pull a Linux implant.

This is the shape I keep seeing in these bugs. The authentication flaw gets the CVE, but the impact comes from an application feature designed to execute code for whoever holds the admin session. The trust boundary was the session, and the session was forgeable.

🕵️ Two Minutes From Scan to Admin

GreyNoise published the timeline on November 23, and it is unusually complete. At 13:17:45 UTC on October 2, an automated pipeline started against an HFS server. It posted to loginSrp1 repeatedly, decoded the sid out of each returned cookie, and reconstructed the PRNG state. At 13:19:37, one minute and fifty-two seconds later, the same pipeline sent admin requests with forged cookies. The forged cookie carried allow_session_ip_change: true, which is the field you set when you are operating behind a VPN.

Three days later the actor used the same route to install middleware hooks and append an SSH key to /root/.ssh/authorized_keys. On October 19 they reused the forgery to try to install an implant through server_code, failed, and came back the next day over SSH to set the box up as a relay with Chisel.

That server was 81 days behind the fix. Details went public on September 30 and the first probes showed up the next day, so the window was short. Nobody closed it.

Two scope corrections, because this story got flattened in the coverage. GreyNoise says it believes the HFS compromise was this CVE, on a server where it “was not patched,” but that is an assessment rather than a capture of the exploit itself. And HFS was not how the actor got into the Check Point management servers. GreyNoise says the actor already had access to those before the file server was compromised, and could not determine when or how that first access happened. The HFS box was the hop, not the door.

🩹 The Fix Is Three Lines and Two Comments

Here is the actual patch, commit 59472e53, “fix: prevent session forgery via predictable signing key (CVE-2026-61500)”:

// before
|| [randomId(30)] // randomness at start gives some extra security
// after
|| [randomBytes(32).toString('base64url')] // cookie signatures need randomness that cannot be reconstructed from observable Math.random() output

and:

// before
const sid = Math.random()
// after
const sid = randomUUID()

Two imports from node:crypto, three lines, and the comment on the key change is the entire CVE in one sentence. The randomId helper stays in the codebase with a new comment marking it non-cryptographic, because it is still fine for the things it is actually used for.

The release that carried it was a security sweep. Six of the commits in 3.2.1 name CVEs, 61500 through 61505: session forgery, XSS on failed logins, CSRF through GET APIs, a path traversal in the ?lang parameter, filename escaping in the basic listing, and a missing plugin event.

The published release note says this, in full: “Multiple security vulnerabilities have been found in all previous versions, potentially allowing an attacker to gain administrative access to HFS.” No CVE IDs, no severity, no indication that one of them was a 9.3. The identifiers were in the git log, where the people running a file server on a Windows box are not looking.

If you run HFS: 3.2.1 is the minimum, and 3.4.2 from November 24 is the current release, labeled an important security update for two unrelated advisories. Set COOKIE_SIGN_KEYS explicitly so a restart does not invalidate every session, and set admin_net if the admin UI does not need to be reachable from everywhere. If you cannot patch tonight, take the admin interface off the network. A forged cookie does not need your password, so changing it will not help.

🧠 Final Thoughts

The bug is one line of Math.random() in a place where it looked harmless, plus another line in a different file that leaked the same stream. Neither is a vulnerability on its own. Together, with a cookie format that signs but does not encrypt, they turn a login endpoint into a key distribution channel.

What I will take from this is narrower than “use a CSPRNG,” which I already knew. What I did not have a good rule for is the output side: any value from the same generator that produced a secret should be treated as that secret’s prefix, and an unauthenticated endpoint that reflects it is a leak even when the response looks perfectly normal. Twelve cookies. That was the entire reconnaissance budget.

The other thing is the release note. A patch that fixes six CVEs and describes itself in one sentence is a patch most of the installed base will never apply, and 81 days is what that looks like in practice. The commit log was honest. The changelog was not.

Thanks for reading.

[ SIGNATURE VERIFIED // GPG 0x4EB27DB0 // PROVENANCE SECURE ]
➔ RETURN TO LOGS