Critical Rejetto HFS Flaw CVE-2024-23652 Lets Attackers Forge Admin Sessions
Key Takeaways A critical flaw, CVE-2026-61500, has been discovered in Rejetto HTTP File Server (HFS) 3.x. The vulnerability allows remote attackers to forge administrator sessions and achieve remote...
Key Takeaways
- A critical flaw, CVE-2026-61500, has been discovered in Rejetto HTTP File Server (HFS) 3.x.
- The vulnerability allows remote attackers to forge administrator sessions and achieve remote code execution.
- The flaw stems from the use of a non-cryptographically secure random number generator (Math.random()) for session signing keys.
- The vulnerability was identified by Anthropic’s Mythos AI in collaboration with Horizon3.
- Administrators are advised to update to a patched version when available and implement strong COOKIE_SIGN_KEYS.
Critical Rejetto HFS Flaw CVE-2026-61500 Lets Attackers Forge Admin Sessions
A severe vulnerability has been uncovered in the Rejetto HTTP File Server (HFS), a popular open-source application for file sharing. The flaw, designated CVE-2026-61500, could enable remote attackers to bypass authentication, forge administrative sessions, and ultimately execute arbitrary code on affected systems.
Table Of Content
This critical issue originates from the server’s reliance on JavaScript’s Math.random() function for generating session-signing keys. Unlike cryptographically secure random number generators, Math.random() produces predictable output, creating a significant security weakness.
The discovery was made by Horizon3 as part of their involvement in Anthropic’s Project Glasswing, which commenced in July 2026. This initiative leverages Anthropic’s Mythos Preview AI model, in partnership with industry experts, to identify and address critical vulnerabilities in both proprietary and open-source software. Anthropic claims Mythos possesses the capability to autonomously detect high-severity flaws and devise sophisticated exploit pathways.
Understanding the Vulnerability in HFS 3.x
Rejetto HTTP File Server, widely known as HFS, is a widely used open-source tool for hosting and distributing files. The project has a history of security challenges, including CVE-2024-23692, an unauthenticated template-injection vulnerability that led to remote code execution in earlier iterations of HFS.
The newly disclosed flaw specifically impacts the TypeScript-based HFS 3.x branch. HFS utilizes the Koa Node.js framework for managing user sessions. When the COOKIE_SIGN_KEYS configuration parameter is not explicitly set, the application defaults to creating a signing key using the randomId(30) function. Crucially, this function relies on Math.random() instead of a cryptographically robust random-number generator.
This design choice introduces a severe risk because Node.js’s V8 engine implements Math.random() using the xorshift128+ pseudo-random-number generator. While efficient, this algorithm is not designed with cryptographic security in mind. Consequently, an attacker can reconstruct its internal state if they can acquire a sufficient number of consecutive output values.
Mythos AI’s Role in Discovery and Exploitation
The Mythos AI reportedly identified that HFS inadvertently leaks these pseudo-random outputs during its authentication process. Specifically, the loginSrp1 endpoint generates a session identifier using Math.random() and stores this identifier in a client-side session cookie.
Since this session cookie is signed but not encrypted, an attacker can decode their own issued cookie. By repeatedly triggering the login process, they can collect high-precision random values that originate from the same V8 pseudo-random stream.
With enough of these values, an attacker can employ a solver, such as Z3, to recover the internal state of the xorshift128+ generator. Once the internal state is known, the attacker can then step the state backward to deduce the session-signing key that was initially generated when the server started.
Possessing the recovered signing key, an attacker can craft a valid session cookie that falsely claims to belong to an HFS administrator account. This forged cookie can also incorporate fields like allow_session_ip_change to circumvent session IP restrictions, enhancing the attacker’s ability to maintain access.
Once authenticated as an administrator, the attacker gains access to HFS administrative API functionalities that permit custom endpoints and arbitrary JavaScript execution. This escalates the initial authentication bypass into full-fledged remote code execution on the compromised server. Horizon3 said that Mythos not only detected the weak PRNG usage but also linked it to exposed random values, developed a mathematical recovery method, generated a functional Z3-based proof-of-concept, and demonstrated arbitrary command execution.
This incident underscores a growing concern for cybersecurity defenders: the increasing sophistication of AI-assisted vulnerability research could potentially democratize the weaponization of complex flaws. Bugs that once demanded deep cryptographic expertise, reverse engineering skills, and extensive exploit development might become more accessible to malicious actors as advanced AI models automate code analysis and exploit chaining.
What You Should Do
- Update HFS: Apply the vendor-fixed release of Rejetto HFS as soon as it becomes available.
- Configure COOKIE_SIGN_KEYS: Explicitly configure strong, cryptographically secure values for the
COOKIE_SIGN_KEYSparameter in your HFS setup. Do not rely on default or automatically generated keys. - Avoid Math.random() for Security: Ensure that
Math.random()or any other non-cryptographically secure random number generator is not used for security-sensitive values within your applications. - Restrict Public Access: Limit public exposure to HFS administrative functions. Implement strict access controls and consider placing administrative interfaces behind a VPN or internal network.
- Monitor Logs: Regularly monitor server logs for any unusual authentication attempts, unexpected session activity, or the creation of unauthorized custom endpoints.
Disclaimer: HackersRadar reports on cybersecurity threats and incidents for informational and awareness purposes only. We do not engage in hacking activities, data exfiltration, or the hosting or distribution of stolen or leaked information. All content is based on publicly available sources.



No Comment! Be the first one.