Skip to main content

Rejetto HFS2 CVE-2026-97359

| EUVDEUVD-2026-85879 CRITICAL
Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336)
2026-09-24 VulnCheck GHSA-2w8r-rhgc-4pch
10.0
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify exposed HFS2 upload endpoint
  2. Delivery
    POST multipart upload with crafted filename
  3. Exploit
    Escape template quoting, inject exec macro
  4. Execution
    Bypass dispatcher authorization check
  5. Impact
    Execute arbitrary OS commands on host

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
Exploitation Conditions

Exploitation requires a reachable HFS2 (Rejetto HTTP File Server) instance with the multipart file-upload feature accessible to the attacker, running version 2.4.0 or earlier. The payload must be a crafted upload filename that supplies a closing template quoting sequence followed by an exec macro to escape the template context and reach the exec path; this bypasses the dispatcher authorization check, so no credentials, user interaction, or non-default toggle is otherwise needed (PR:N/UI:N). The practical limiting factor is exposure of the upload endpoint - instances that do not expose upload functionality, or that restrict it behind an external control, are not exploitable through this path.

Impact

This is a genuine top-priority vulnerability, not a high-CVSS-but-low-risk artifact. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N with VC/VI/VA:H and subsequent-system SC/SI/SA:H) describes unauthenticated, low-complexity, no-interaction network exploitation that yields full remote code execution on the host - the maximal 10.0 score. A public exploit/advisory exists (github.com/wgetnz/hfs2 and VulnCheck), so exploitation is not merely theoretical. The chief mitigating factor is the requirement that upload functionality be reachable: the attacker must be able to POST a multipart upload to an exposed HFS2 instance, and the payload rides in a crafted filename that escapes the template quoting sequence and injects an exec macro, bypassing the dispatcher's authorization check. No EPSS score, KEV entry, or SSVC decision framework was supplied in the input, so widespread-versus-targeted exploitation cannot be quantified - but the combination of unauth RCE, a public POC, and a VulnCheck advisory places this at the high end of real-world risk. Notably, HFS 2.x has a documented history of exactly this bug class (template-injection RCE, CVE-2024-23692, which was added to CISA KEV), so mass exploitation of internet-exposed instances is a realistic near-term expectation even though this specific CVE is not yet KEV-listed.

Exploit ScenarioDerived

An attacker locates an internet-exposed HFS2 (Rejetto HTTP File Server) instance and sends a multipart file-upload request whose filename contains a closing template-quote sequence followed by an HFS exec macro. The template engine evaluates the injected macro during upload handling, bypassing the dispatcher's authorization check and running the attacker's command on the host with no authentication. A public advisory and exploit writeup already exist, lowering the skill and effort required to weaponize this.

Monitor Track and reassess. Why: Vendor states no customer action required.
1 public PoC + 1 unverified No patch listed yet 0.8% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 24, 2026

Unauthenticated remote code execution in Rejetto HFS2 (HTTP File Server) through version 2.4.0 lets an attacker execute arbitrary commands on the underlying host by hiding server-side template syntax inside the filename of a multipart file upload. The crafted filename closes the template quoting context and injects an exec macro, which bypasses the dispatcher's authorization check, so no credentials or user interaction are required (assessed CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H; vendor score 10.0). Publicly available exploit code exists and an advisory with a proof-of-concept walkthrough is referenced by VulnCheck, but no KEV entry was provided, so this is not confirmed as actively exploited; the practical limiting factor is whether the multipart upload endpoint is reachable from the attacker's network.

RemediationAI

No vendor-released patch was identified in the available data at time of analysis, so remediation must start with compensating controls. First, disable or block the multipart upload capability entirely if it is not operationally required, or restrict the upload endpoint to trusted source addresses only - this removes the attack surface but breaks legitimate file-upload workflows for external users. Second, if uploads must remain available, place the HFS2 service behind an authenticating reverse proxy or VPN and terminate external access to the raw port; the trade-off is added latency and credential management, and any bypass of the proxy reopens the vulnerable path. Third, run the HFS2 service under a low-privilege, sandboxed account with no write access to system directories and no ability to spawn shells, and consider OS-level controls (AppArmor/SELinux, restricted egress) so that a successful exec macro has limited blast radius. Fourth, add a WAF/reverse-proxy rule that rejects multipart filenames containing template/macro delimiters or the exec keyword, understanding that such signature filtering is bypassable and should not be the only control. Finally, monitor both advisories - https://www.vulncheck.com/advisories/hfs2-rce-via-multipart-upload-filename-template-injection and https://github.com/wgetnz/hfs2/blob/master/advisories/hfs2-upload-filename-template-injection/README.md - for an upstream fix and upgrade to the first patched release as soon as an exact version number is published; do not assume any specific version number until the vendor confirms it.

Affected VersionsENISA

hfs2 2.0.0 ≤2.4.0

Affected Packages

euvd hfs2 no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

HFS2 is Rejetto's lightweight HTTP file server, which renders dynamic pages through an internal template/macro engine (macros such as exec are evaluated during page rendering). The flaw is an instance of CWE-1336, Improper Neutralization of Special Elements Used in a Template Engine: the multipart upload handler interpolates the client-supplied filename directly into a template context without escaping or validation, so template syntax in the filename is parsed rather than treated as literal text. By embedding a closing template quoting sequence in the filename, an attacker terminates the surrounding template string and injects an exec macro that survives into the evaluation pipeline. Because the crafted filename is processed before/around the dispatcher's authorization decision, the injected macro reaches the exec path without the normal access check. The CPE cpe:2.3:a:rejetto:hfs2:*:*:*:*:*:*:*:* is a wildcard over all HFS2 releases, while the advisory scopes the issue concretely to version 2.4.0 and earlier; the attack surface is the multipart upload endpoint, and successful exploitation yields command execution in the security context of the HFS2 service account.

Know when Hfs2 gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 10.0 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
vuln.today AI 9.8 CRITICAL

Unauthenticated network RCE via a crafted upload filename gives full host command execution (C/I/A:H); S:U reflects code exec within the app's own OS context, though S:C is arguable since the flaw is app-layer and impact is host-wide.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

DescriptionCVE.org

HFS2 version 2.4.0 and earlier contains a template injection vulnerability in the multipart upload handler that allows unauthenticated attackers to achieve remote code execution by embedding malicious template syntax in a filename. Attackers can craft a filename containing a closing template quoting sequence followed by an exec macro, which bypasses the authorization check in the dispatcher to execute arbitrary commands on the underlying host system.

Technical POC Analysis

CWE-1336: improper neutralization of template-engine special elements.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Latest POC

1 public PoC link from github, nuclei, plus 1 unverified

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

Rejetto HFS2 (HTTP File Server) through version 2.4.0 carries a maximum-severity 10.0 vulnerability that allows anyone on the network to run arbitrary code on the host without credentials or user interaction. With publicly available exploit code circulating and no vendor patch, any HFS2 instance reachable from an untrusted network effectively hands full control of that server to an attacker. Leadership should treat every deployment of this product as a priority exposure, particularly internet-facing installations, since host compromise can cascade into lateral movement and data loss across connected systems.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: remove internet and untrusted-network exposure (firewall or reverse-proxy block), disable the multipart upload endpoint or stop the HFS2 service if not business-critical, migrate to a supported alternative file-transfer product, enforce network segmentation with deny-by-default egress on any host still running HFS2, apply WAF/proxy filtering that rejects multipart uploads whose filenames contain server-side template or exec macro syntax, restrict file-upload paths to authenticated and audited users where the architecture permits, and enable process and file-integrity monitoring on HFS2 hosts to detect post-exploitation activity.

Threat Intelligence Overview

EPSS Score
0.8%
Top 46% exploitable
Prevalence
Medium
popular lightweight self-hosted file server, common in small/home setups, not enterprise-ubiquitous
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.8%
Patch available No
Active threat No
Deciding rule
Vendor states no customer action required
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

71
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +50
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy