Lightweight self-hosted file sharing servers remain popular among software engineers, small studios, and home lab administrators seeking fast cross-device transfers without external cloud storage fees. Rejetto HTTP File Server (HFS) has served this niche for years by pairing a zero-configuration Node.js backend with an integrated web administration console. Yet exposing self-hosted file utilities directly on public IP addresses places fragile authentication parsers straight in the path of automated exploit scanners.

The emergence and active exploitation of CVE-2026-61500 (CVSS score 9.3) underscores how quickly a subtle cryptographic implementation mistake escalates into full host takeover. Affecting Rejetto HFS versions 3.0.0 through 3.2.0 and elevated into CISA's Known Exploited Vulnerabilities (KEV) Catalog in late November 2026 under strict federal remediation directives, this flaw enables unauthenticated remote attackers to recover session-signing secrets, forge administrator cookies, and execute arbitrary system commands. Keeping private file portals off public networks behind a stateless WireGuard perimeter powered by VPNRice and RiceGuard stops this vulnerability class before an attacker can collect a single handshake packet.

How Non-Cryptographic Math.random() Broke HFS Session Signing

Modern web frameworks depend on unpredictable random entropy to generate session signing keys, cryptographic salts, and authentication challenges. Inside Rejetto HFS 3.x—built atop Node.js and the Koa web framework—the server initialized its session-cookie signing secret using standard JavaScript Math.random() rather than Node's cryptographic CSPRNG API (crypto.randomBytes()).

Unlike operating system entropy pools designed to resist mathematical inference, V8's implementation of Math.random() relies on the xorshift128+ pseudo-random number generator (PRNG):

  • Deterministic Linear State: xorshift128+ maintains a compact 128-bit internal state updated solely through bitwise shifts and XOR operations (state0, state1). Every floating-point value emitted represents a deterministic transformation of those two 64-bit registers.
  • Unauthenticated Entropy Leakage: During unauthenticated login handshakes (including Secure Remote Password negotiation workflows), Rejetto HFS exposed values originating from the exact same Math.random() generator instance to remote clients before identity verification.
  • Z3 and SMT State Inversion: Because linear transitions in xorshift128+ map cleanly into Boolean satisfiability equations, security researchers demonstrated that capturing just a handful of consecutive HTTP login responses allows an SMT solver to solve for the exact internal 128-bit PRNG state.

Once an attacker reconstructs the generator's internal registers, predicting future outputs—or rewinding backward to the initialization call that generated the Koa cookie signing key at server startup—becomes trivial arithmetic.

Recovering the session-cookie HMAC signing key effectively hands external adversaries root-equivalent administrative privileges inside the HFS application without guessing a password or brute-forcing any credential.

The post-prediction exploitation sequence follows three concise steps:

  • Offline Administrator Cookie Signing: Armed with the reconstructed signing key, the attacker crafts a JSON session object asserting administrator role flags, computes a valid cryptographic signature locally, and injects the forged cookie into standard HTTP requests.
  • Silent Portal Authentication: When Rejetto HFS inspects the inbound cookie header, the signature verification succeeds identically to a legitimate login from the host owner, granting instant entry to the web administration interface.
  • Command Execution Through server_code: Rejetto HFS includes a built-in scripting customization facility known as server_code, intended to let administrators extend web templates and trigger event hooks. By writing arbitrary JavaScript or Node child-process invocations into server_code through authenticated administrative APIs, remote attackers immediately achieve full Remote Code Execution (RCE) under the service account running HFS.

Notably, security trackers noted that CVE-2026-61500 surfaced through automated AI vulnerability-reasoning pipelines (including research leveraging Anthropic's Mythos workflows) before rapid weaponization in the wild forced CISA to mandate expedited remediation deadlines.

Why Application-Layer Fixes Remain Insufficient for Public File Servers

Rejetto resolved the direct randomness flaw in version 3.2.1, replacing non-cryptographic generation with proper system entropy to protect newly issued cookies. However, running hfs directly exposed on public TCP ports 80 or 443 still invites high-frequency probing whenever future zero-day bugs hit Node.js dependencies, Koa middleware, or template handlers.

Inspecting active exposure and verifying server integrity requires checking listening sockets and service versions locally:

# Audit listening Rejetto HFS ports and running Node process version
ss -tlnp | grep -E ':80|:443|node|hfs'
ps aux | grep -i hfs

If an HFS instance version between 3.0.0 and 3.2.0 ever faced the public internet unshielded prior to upgrading to 3.2.1+, administrators must assume active exploitation may have already modified configuration files or added malicious hooks inside server_code, rotating all stored credentials and server keys accordingly.

Eliminating Public Probe Exposure with VPNRice WireGuard Bastions

The decisive architectural defense against cookie prediction, state leakage, and pre-authentication RCE on self-hosted portals is removing the web server from the public internet entirely. Rather than relying on application login screens as the outer defense perimeter, administrators should place Rejetto HFS inside a private cryptographic bastion powered by WireGuard and VPNRice.

A WireGuard overlay built on the hardened RiceGuard kernel model neutralizes CVE-2026-61500-style threats at the transport boundary:

  • Zero Public Handshake Leakage: Binding HFS strictly to loopback (127.0.0.1) or a private WireGuard virtual interface prevents unauthenticated internet scanners from initiating SRP handshakes or harvesting PRNG responses. Without response packets, xorshift128+ state reconstruction cannot begin.
  • Kernel-Native Silent Port Architecture: Unlike HTTP file portals that respond immediately to unauthenticated requests, WireGuard listens on a single stateless UDP port. Packets arriving without a valid Noise framework handshake—derived from real kernel entropy sources (getrandom()) and Curve25519 / ChaCha20-Poly1305 cryptography—are dropped silently by the Linux kernel with zero return traffic.
  • Deterministic Cryptokey Routing: Access to internal file shares and administrative configuration hooks is tied strictly to verified peer public keys mapped in AllowedIPs. Even if an internal service contains a latent middleware bug, external attackers possess no network path to send payloads to the listening port.
  • Encrypted Multi-Device File Access on the Move: Remote engineers and distributed teams connect to home or office servers through VPNRice WireGuard tunnels from laptops and mobile devices, preserving seamless HTTP file access on the move while keeping every port closed to the raw internet.

Combining timely upgrades to HFS 3.2.1+ with strict WireGuard perimeter isolation transforms self-hosted file sharing from an exposed target into an invisible private resource.