CVE-2026-61500 Overview
Rejetto HTTP File Server (HFS) versions 3.0.0 through 3.2.0 contain a cryptographic weakness in session cookie generation. The server derives its session-cookie signing key from JavaScript's Math.random(), a non-cryptographic pseudorandom number generator [CWE-338]. The same generator's output is exposed to unauthenticated clients during the login flow. An unauthenticated remote attacker can collect a small number of login responses, reconstruct the generator state, recover the signing key, and forge an administrator session cookie. Successful exploitation grants full administrative access and enables remote code execution through the server_code configuration feature.
Critical Impact
Unauthenticated attackers can forge administrator session cookies and achieve remote code execution on affected HFS 3 servers reachable over the network.
Affected Products
- Rejetto HFS 3.0.0
- Rejetto HFS versions 3.0.0 through 3.2.0
- Fixed in Rejetto HFS 3.2.1
Discovery Timeline
- 2026-07-13 - CVE-2026-61500 published to the National Vulnerability Database
- 2026-07-15 - Last updated in NVD database
Technical Details for CVE-2026-61500
Vulnerability Analysis
HFS 3 uses Math.random() to derive the secret key that signs administrator session cookies. Math.random() is a linear-congruential-style pseudorandom generator in Node.js and V8. It is not cryptographically secure and its internal state can be recovered from a small window of observed outputs.
During authentication, HFS returns values derived from the same PRNG stream to unauthenticated clients. An attacker who requests the login endpoint several times obtains enough sequential outputs to reconstruct the generator state. Once the state is known, the attacker can compute past and future outputs, including the signing key protecting session cookies.
With the signing key in hand, the attacker forges a valid session cookie for the administrator account and authenticates without credentials. The server_code feature in HFS accepts server-side JavaScript from administrators, converting the account takeover into arbitrary code execution on the host operating system.
Root Cause
The root cause is the use of a non-cryptographic pseudorandom number generator for security-critical secret material, combined with disclosure of PRNG outputs to unauthenticated endpoints. Session-cookie signing keys must be produced from a cryptographically secure source such as Node.js crypto.randomBytes().
Attack Vector
The vulnerability is exploitable remotely over the network without authentication or user interaction. The attacker interacts only with the login endpoint to harvest PRNG outputs, then submits a forged cookie against any authenticated administrative endpoint. See the VulnCheck Advisory on HFS for full technical analysis.
Detection Methods for CVE-2026-61500
Indicators of Compromise
- Repeated login requests from a single source IP within a short interval, consistent with harvesting PRNG outputs from the authentication endpoint.
- Successful administrator session activity from IP addresses that never submitted valid credentials.
- Unexpected modifications to the server_code configuration field or new outbound connections initiated by the HFS process.
- Child processes spawned by the HFS Node.js process that execute shell commands or scripting interpreters.
Detection Strategies
- Alert on HFS access logs where an IP performs a burst of POST requests to the login endpoint followed by authenticated administrative actions.
- Baseline administrator login source addresses and flag sessions originating from previously unseen IPs or geographies.
- Monitor the HFS configuration file for unauthorized changes to server_code or other administrative settings.
Monitoring Recommendations
- Forward HFS access and error logs to a centralized log platform for correlation with authentication and process telemetry.
- Track process-lineage events on hosts running HFS to detect code execution originating from the server process.
- Enable network-layer logging of connections to the HFS listener to support post-incident reconstruction.
How to Mitigate CVE-2026-61500
Immediate Actions Required
- Upgrade HFS to version 3.2.1 or later, available at the GitHub HFS Release v3.2.1 page.
- Restrict network exposure of the HFS administrative interface using firewall rules or a reverse proxy with IP allow-listing until patching is complete.
- Rotate any administrator credentials and invalidate existing sessions after upgrading.
- Audit the server_code configuration and remove any unrecognized JavaScript payloads.
Patch Information
Rejetto released HFS 3.2.1, which replaces the vulnerable key-derivation logic and no longer leaks PRNG state to unauthenticated clients. Administrators should apply the patch on all instances running HFS 3.0.0 through 3.2.0. Refer to the GitHub HFS Release v3.2.1 notes for upgrade instructions.
Workarounds
- Place HFS behind a reverse proxy that requires authentication before the login endpoint is reachable.
- Block internet access to the HFS listener and expose it only over a VPN or trusted management network.
- Disable or remove the server_code feature to reduce impact if administrator access is compromised.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

