Summary
CVE-2026-97359 is a critical, unauthenticated remote code execution vulnerability in Rejetto HFS2 (HTTP File Server, the legacy 2.x branch), affecting version 2.4.0 and earlier. The flaw is a template injection in the multipart upload handler: an attacker-controlled filename is inserted into HFS2’s template engine without proper escaping, and combined with a bypass of the macro dispatcher’s authorization check, allows arbitrary command execution on the host with no authentication or user interaction required. The issue is tracked under CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine) and carries the maximum CVSS score of 10.0.
Technical details
- Root cause: When processing a multipart file upload, HFS2 places the uploaded filename into its template symbol map as
%item-resource%without applying the HTML/macro escaping used for sibling fields such as%item-name%. - Trigger condition: The template engine performs symbol replacement sequentially, so a value introduced by one substitution step can itself be re-scanned as template syntax in a later step, allowing an attacker-supplied filename to be re-interpreted as template markup.
- Attack vector: A remote, unauthenticated attacker submits a multipart file upload whose filename contains a sequence that closes the current template quoting context followed by an
execmacro invocation. - Impact: Because the macro dispatcher does not enforce an authorization check before executing the
execmacro, the injected macro runs with the privileges of the HFS2 process, resulting in full remote code execution and complete loss of confidentiality, integrity, and availability of the host.
Affected software
- Rejetto HFS2 (HTTP File Server, legacy 2.x codebase) versions 2.0.0 through 2.4.0, including 2.4.0 release candidate builds.
- Not confirmed to affect the separately maintained, current-generation HFS 3.x codebase.
Severity
- CVSS v3.1 Base Score: 10.0 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate: HFS2 is a legacy, no-longer-maintained product line; no vendor-supplied patched version exists as of publication. Organizations should migrate away from HFS2 to a supported file-sharing solution, or upgrade to the actively maintained HFS 3.x product if migration is required.
- If no patch is available:
- Take internet-facing HFS2 instances offline or restrict access to trusted internal networks only (e.g., via firewall/VPN), since the flaw requires no authentication and is fully remotely exploitable.
- Filter or reject upload filenames containing template-control characters (
%,{,},|,:}) at a reverse proxy or WAF in front of HFS2. - Run the HFS2 process under a low-privilege service account to limit the impact of any successful command execution.
- Disable or remove file upload functionality if it is not required for business operations.

