The U.S. Cybersecurity and Infrastructure Security Agency (CISA) has added CVE-2026-61500, a critical unauthenticated session-forgery flaw that can lead to remote code execution in Rejetto HFS 3.0.0 through 3.2.0, to its Known Exploited Vulnerabilities (KEV) catalog and set a deadline of Thursday, December 3, for Federal Civilian Executive Branch (FCEB) agencies under Binding Operational Directive (BOD) 26-04. The bug lets an attacker reconstruct the V8 PRNG state exposed during the SRP login handshake, recover the key that signs HFS session cookies, forge an administrator session, and abuse the server_code configuration feature to run server-side JavaScript. GreyNoise has linked exploitation to GT13 infrastructure used as a relay in attacks at 22 organizations, while more than 900 HFS instances are tracked as exposed online. HFS 3.2.1 is the first fixed release.

CISA sets a federal patch deadline

CISA added the vulnerability to the KEV catalog on Monday and announced the deadline in a CISA alert. The requirement comes from BOD 26-04, which covers federal civilian agencies; CISA separately encouraged private-sector defenders and other security teams to patch as well. The agency warned that flaws of this type are frequently used by malicious actors and pose a serious risk to federal networks.

Rejetto HFS (HTTP File Server) is an open-source file-sharing server that users can host themselves on Windows, Linux, or macOS. Its administrative surface makes an authentication bypass especially consequential: an attacker who can mint an administrator cookie can change server configuration rather than merely read shared files.

How the forgery chain works

HFS 3.0.0 through 3.2.0 built the Koa session-cookie signing key by calling JavaScript's Math.random(), a non-cryptographic pseudo-random number generator (PRNG). The same V8 PRNG also produced values that were disclosed to unauthenticated clients during the SRP login exchange. In vulnerable builds, a loginSrp1 request for an existing account such as admin returns a numeric loggingIn.sid inside the hfs_http cookie, plus a matching hfs_http.sig signature, in the Set-Cookie headers.

The CVE description says an attacker can collect a small number of login responses, reconstruct the generator state, recover the signing key, and forge a valid administrator cookie. That cookie yields full administrative access; from there, the documented server_code setting provides a path to server-side JavaScript execution. The public proof of concept classifies the bug as CWE-338, use of a cryptographically weak PRNG.

Recovering the key and forging a session

The published exploit follows a deterministic sequence:

  1. Collect leaks. The PoC sends six unauthenticated loginSrp1 API requests for the known admin account.
  2. Extract the identifier. Each vulnerable response places a numeric loggingIn.sid and its signed session cookie in Set-Cookie headers.
  3. Rebuild the PRNG state. Five consecutive doubles expose 53 bits each. The PoC brute-forces the eleven omitted low bits and walks V8's xorshift128+ recurrence backward and forward until one internal state satisfies every observed value. It also models V8's 64-value random cache, which returns entries in reverse order.
  4. Reconstruct the signing key. HFS builds the key through randomId(30), which the PoC reproduces as three base-36 chunks. It accounts for V8 shortest-string rounding and checks candidates against an observed hfs_http.sig HMAC; the match also identifies the startup offset, since other startup code may consume values before the first SID.
  5. Forge administrator access. The PoC signs a synthetic session containing username: admin and calls get_config to prove the cookie is accepted.
  6. Execute code. It calls set_config with a small server_code module. The default payload writes a benign marker in /data; a --command option is available only in the loopback Docker lab.

The core state transition and cookie check in the public PoC look like this:


def xorshift_step(older: int, newer: int) -> int:
    value = older
    value ^= (value << 23) & MASK64
    value ^= value >> 17
    value ^= newer
    value ^= newer >> 26
    return value & MASK64

def keygrip_signature(key: str, payload: str) -> str:
    digest = hmac.new(
        key.encode(), f"hfs_http={payload}".encode(), hashlib.sha1
    ).digest()
    return base64.urlsafe_b64encode(digest).decode().rstrip("=")

The first routine advances the xorshift128+ state; the second recomputes the cookie signature the PoC compares with the server's hfs_http.sig.

Proof of concept and lab reproduction

A. Ramos published a Python PoC and a disposable Docker comparison using the official HFS 3.2.0 and 3.2.1 images; the repository credits Zach Hanley of Horizon3.ai, working with Claude and Anthropic Research, with discovering the flaw. The PoC file is dated September 26, 2026, and its publication build accepts only HTTP targets on the loopback interface.

The repository's ./verify.sh starts digest-pinned vulnerable and fixed containers; KEEP_LAB=1 ./verify.sh leaves them running for inspection. With the 3.2.0 lab active, the benign marker test is:


python3 cve-2026-61500-poc.py \
  --target http://127.0.0.1:28182 \
  --marker cve-2026-61500-rce-marker.txt

The command-execution control inside the disposable container is:


python3 cve-2026-61500-poc.py \
  --target http://127.0.0.1:28182 \
  --command 'id > /data/cve-command-output.txt'

In the September 26 run against rejetto/hfs:v3.2.0, the PoC recovered one PRNG state and signing key, received HTTP 200 from a forged administrative get_config, installed the marker payload, and observed CVE_2026_61500_RCE_CONFIRMED in the container. The --command control produced uid=0(root) gid=0(root) groups=0(root). Against HFS 3.2.1, the first login response contained an opaque UUID and the PoC exited with status 3 before attempting session forgery.

The exploit is a black-box HTTP chain: according to its author, it does not read files, memory, environment variables, or process state from the target. Any non-loopback hostname, HTTPS target, or remote IP is rejected by argument validation. It should be used only in the disposable lab or on systems with explicit authorization.

Exploitation in the wild

VulnCheck's Canary Intelligence honeypots first observed probing for vulnerable HFS servers in early October. Caitlin Condon, VulnCheck's VP of Security Research, characterized the activity as small-scale reconnaissance from a single China Telecom IP address against deployments in Japan and the United States.

GreyNoise later reported that GT13, a threat group it tracks, had been exploiting CVE-2026-61500 to compromise HFS servers and use them as operational relays. Those relays figured in attacks that compromised two dozen Check Point Security management servers across 22 organizations between October 17 and November 2. CISA did not release additional details about the ongoing exploitation.

Exposure remains significant. An internet-wide scan cited in the reporting tracks more than 900 Rejetto HFS instances online, with the largest identified concentrations in China (205) and the United States (121). The reporting does not establish how many of those systems are honeypots or have already been secured.

Detection and mitigation

The primary fix is to upgrade to HFS 3.2.1. The first fixed release replaces the signing key with 32 bytes from Node.js randomBytes() and replaces the exposed numeric login identifier with randomUUID(); the upstream change is commit 59472e534bf7e056d708382d02935c2eaf956927. Supplying an explicit strong COOKIE_SIGN_KEYS value mitigates signing-key prediction, but upgrading remains the recommended remediation.

Defenders should inventory internet-facing HFS deployments, confirm their versions, and remove administrative interfaces from direct internet access where possible. Repeated unauthenticated loginSrp1 requests for admin are a useful hunt signal, as are unexpected changes to server_code, new files under /data, or unusual child processes spawned by the HFS service. On a fixed server, the numeric login identifier is replaced by an opaque UUID, so a numeric loggingIn.sid is a strong indication that an affected build is still running.

Technical background

Math.random() is not a cryptographic random-number generator. V8 implements it with xorshift128+, which has a 128-bit internal state and returns doubles whose top 53 bits are exposed. Recovering that state is a constraint-solving problem: each observed output leaves 11 low bits unknown, but several consecutive values provide enough equations to identify the state and then predict future outputs, including key material.

HMAC-based cookie signing provides integrity only while the key remains secret. If the key is generated from a predictable stream, an attacker can compute the same signature the server will accept. That is why the flaw bypasses authentication without a password and why moving to a cryptographically secure key source, rather than merely changing the cookie format, is the essential fix.

References