CVE-2026-61500 - Rejetto HTTP File Server (HFS) Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) Vulnerability

CVE-2026-61500

Rejetto HTTP File Server (HFS) - Admin Session Forgery to RCE via a Predictable Math.random() Signing Key

What is Rejetto HTTP File Server (HFS)?

Rejetto HTTP File Server, almost always shortened to HFS, is a free single-process web server written by Massimo Melina for publishing a folder over HTTP. Point it at a directory and it serves a browsable listing with uploads, accounts and link sharing, which has made it a twenty-year favourite among home users, small teams, lab environments and anyone who needs to hand out files without standing up a real file service. The 2.x line was a Delphi program for Windows; HFS 3.x, the line this vulnerability affects, is a full rewrite in TypeScript running on Node.js, which is why the bug turns on the behaviour of V8's Math.random().

Two properties make HFS an attractive target. It is built to sit directly on the internet, so instances are typically exposed with no reverse proxy and no WAF in front of them. And its admin panel exposes server_code, a documented feature that lets an administrator run custom JavaScript inside the server process. Anything that grants administrator access therefore grants code execution in the same breath, with no second exploit needed.

Overview

CVE-2026-61500 is a pre-authentication session forgery that ends in remote code execution. HFS 3.0.0 through 3.2.0 sign their Koa session cookies with a key generated by Math.random(), and a separate unauthenticated code path hands raw Math.random() output back to the client. An attacker samples that endpoint a handful of times, reconstructs the generator's internal state, winds it back to recover the signing key, and then mints a cookie asserting username: admin. From there the admin API is fully available, and server_code turns it into arbitrary code execution as the account running HFS.

NVD rates the issue CVSS 3.1 9.8, critical (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), under CWE-338, use of a cryptographically weak PRNG. Secondary reporting also cites a CVSS 4.0 score of 9.3. The attack needs no credentials, no user interaction and no unusual configuration: the vulnerable key derivation is what HFS does by default whenever COOKIE_SIGN_KEYS is left unset.

The unusual part of this CVE is the gap between fix and attack. Rejetto shipped 3.2.1 on 2026-07-13, the same day the CVE was published, but the release notes said only that "multiple security vulnerabilities have been found in all previous versions" without naming a CVE. Technical details went public at the end of September, and exploitation followed within days.

Affected Versions

Product Vulnerable Fixed
Rejetto HFS 3.x 3.0.0 through 3.2.0 3.2.1
Rejetto HFS (current stable) any release before 3.2.1 3.3.4 recommended

The 3.2.1 release notes describe the affected scope more broadly than the NVD range, saying all previous versions contain security issues. HFS 2.x is end of life and is not covered by this fix.

Technical Details

The root cause is that a security-critical secret is drawn from a generator never meant to produce secrets. When COOKIE_SIGN_KEYS is unset, HFS derives the cookie signing key from randomId(30), which is built on Math.random(). In V8 that function is the xorshift128+ algorithm, which is fully reversible: given enough consecutive outputs, the 128-bit state can be solved for and then stepped backwards to the value it held at process start.

A second defect supplies those outputs. The unauthenticated loginSrp1 endpoint sets its session identifier to a bare Math.random() double, and koa-session cookies are base64-encoded JSON that is signed but not encrypted, so the client can read the exact floating-point value out of its own cookie. Horizon3's write-up samples the endpoint twelve times and feeds the doubles to the Z3 solver; the public proof of concept uses six requests, extracting 53 visible bits from five consecutive doubles and brute-forcing the eleven low bits that JavaScript discards. Either way the recovered state reproduces the three base-36 chunks of the signing key, which is confirmed against an observed hfs_http.sig HMAC.

With the key in hand the attacker signs a synthetic session of {username: 'admin', ts: now, allow_session_ip_change: true}, calls get_config to confirm the forgery worked, and then calls set_config to install a server_code module. In the public lab that step ran commands as root inside the container. The whole sequence is a short run of ordinary HTTP requests against the login endpoint, well within reach of automation.

Discovery

The vulnerability was found by Zach Hanley of Horizon3.ai. Horizon3's account is that a cryptographic-weakness analysis agent driven by Anthropic's Mythos model flagged the insecure PRNG usage without follow-on prompting, a second verifying agent confirmed it as a true positive, and the model then wrote a working proof of concept including the Z3 solver constraints. Rejetto's 3.2.1 release notes credit Hanley "in collaboration with Claude and Anthropic Research", so the vendor and the researcher name the AI system differently; these are Horizon3's claims about its own research and have not been independently verified. Massimo Melina of Rejetto wrote the fix. The public exploit and Docker lab were published separately by A. Ramos, who recorded a successful test against official 3.2.0 on 2026-09-26 and confirmed the exploit fails against 3.2.1.

Exploitation Context

VulnCheck began detecting exploitation on 2026-10-02 and added the CVE to its own exploited catalogue. By 2026-10-05 its Canary honeypots were seeing probes that BleepingComputer, citing VulnCheck's Caitlin Condon, described as small-scale reconnaissance from a single China Telecom address against deployments in Japan and the United States.

The most substantial public account is GreyNoise's 2026-11-23 report on the actor it tracks as GT13. GreyNoise logged exploitation of an unpatched HFS server at 2026-10-02 13:17:45 UTC, followed two minutes later by admin requests bearing forged session cookies. Note the direction of that compromise: the HFS box was not the target but the infrastructure. GT13 turned it into an operational relay box and used it to stage command output and data stolen from 24 Check Point Security Management Servers across at least 22 organisations, access GreyNoise says the actor already held before the HFS compromise. GreyNoise lists CVE-2026-61500 alongside CVE-2026-16232, CVE-2025-5777, CVE-2024-21893, CVE-2026-41089 and CVE-2026-98432 in that campaign, and says it suspects but cannot prove AI-enabled tooling on the attacker's side. Its summary gives a confirmed window of 2026-10-17 to 2026-11-02 while its own timeline starts on 2026-10-02; the discrepancy is unexplained. No internet-wide exposure count for HFS has been published for this CVE, and no ransomware use is recorded.

Remediation

  1. Upgrade to HFS 3.2.1 or later. The current stable release, 3.3.4, is the better target and carries subsequent fixes. The vulnerable code is replaced with a 32-byte key from Node's randomBytes() and a randomUUID() login identifier that leaks nothing.
  2. If you genuinely cannot upgrade today, set an explicit long random COOKIE_SIGN_KEYS value. This stops the signing key being predictable, but it does not close the PRNG leak itself, and the project still treats upgrading as the remediation.
  3. Invalidate every existing session and rotate administrator credentials after patching. A key recovered before the upgrade is worthless once the key changes, but cookies forged earlier may have been used to plant persistence.
  4. Review the HFS configuration for server_code modules, custom admin endpoints, accounts or share definitions you did not create. That is the primary indicator of compromise, since the attack leaves no file on disk until the attacker chooses to write one.
  5. Search access logs for repeated unauthenticated loginSrp1 POSTs for the admin account from one source in a short window, which is the sampling step, and for admin API calls such as get_config and set_config from sessions that never completed a login.
  6. Take HFS off the public internet where you can. Put it behind a VPN or an authenticating reverse proxy, or restrict source addresses; a server whose login endpoint is unreachable cannot be sampled.
  7. If the host shows signs of compromise, treat it as an attacker relay rather than just a victim, and look for tunnelling tools such as Chisel and for outbound connections to other estates.
  8. Federal civilian agencies must remediate by 2026-12-03 under CISA BOD 26-04.

Key Details

PropertyValue
CVE ID CVE-2026-61500
Vendor / Product Rejetto - HTTP File Server (HFS)
NVD Published2026-07-13
NVD Last Modified2026-11-30
CVSS 3.1 Score9.8
CVSS 3.1 VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
SeverityCRITICAL
CWE CWE-338 find similar ↗
CISA KEV Added2026-11-30
CISA KEV Deadline2026-12-03
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Required Action

CISA BOD 26-04 Deadline: 2026-12-03. Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA's BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA's "Forensics Triage Requirements" (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.

Timeline

DateEvent
2026-07-13CVE-2026-61500 published and Rejetto releases HFS 3.2.1 with the fix
2026-09-30Horizon3.ai publishes its technical disclosure of the predictable signing key
2026-10-02GreyNoise observes the GT13 actor compromise an unpatched HFS server and forge admin session cookies; VulnCheck begins detecting exploitation the same day
2026-10-05VulnCheck honeypots report reconnaissance scanning against internet-facing HFS instances
2026-11-23GreyNoise publishes its analysis of the GT13 campaign that used a compromised HFS server as an operational relay
2026-11-30Added to CISA Known Exploited Vulnerabilities catalog
2026-12-03CISA BOD 26-04 remediation deadline