CVE-2026-61500: Rejetto HTTP File Server (HFS) Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) Vulnerability
Exploitation: In the wild · CVSS 9.8 Critical · Unauthenticated · Published 2026-07-13
Description
Rejetto HFS 3.0.0 through 3.2.0 derives its session-cookie signing key from the non-cryptographic Math.random() generator and discloses outputs of the same generator to unauthenticated clients during login. A remote attacker can collect a small number of login responses, reconstruct the generator's state, recover the signing key, and forge a valid administrator session cookie, leading to full administrative access and remote code execution via the server_code configuration feature.
Enclave's analysis
HFS 3.x derives its session-cookie signing key from Math.random() and leaks that same generator's output to anyone hitting the login endpoint. An attacker samples a few login responses, rebuilds the PRNG state with an SMT solver, forges an admin cookie, and uses HFS's built-in server_code feature to run commands — no password needed, just a known username. A public PoC reproduces the whole chain to root, and GreyNoise caught a live campaign using compromised HFS boxes to pivot into dozens of organizations. Patch to 3.2.1 or set COOKIE_SIGN_KEYS now.
Fix
Upgrade rejetto/hfs to 3.2.1. No fixed version is listed for hfs; follow the vendor advisory.
Affected versions
| Product | Vulnerable | Fixed in |
|---|---|---|
| hfs | 3.0.0 before 3.2.1 | Not listed |
| rejetto/hfs | >=3.0.0, <3.2.1 | 3.2.1 |