Description
http4k before 6.62.0.0-ee contains a path traversal vulnerability in ThymeleafTemplates Caching and HotReload that allows unauthenticated attackers to read files outside baseTemplateDir by supplying ../ segments in ViewModel.template() values. Attackers can influence request-driven template selection so Thymeleaf's FileTemplateResolver resolves escaped paths without containment checks, disclosing any file readable by the server process.
Published: 2026-11-02
Score: 8.2 High
EPSS: n/a
KEV: No
Impact: Information Disclosure
Action: Apply Patch
AI Analysis

Impact

http4k before version 6.62.0.0-ee contains a path traversal flaw in its ThymeleafTemplates caching and hot‑reload mechanism. An attacker can supply a template name containing "../" segments via the ViewModel.template() value. Thymeleaf’s FileTemplateResolver does not perform containment checks on the resulting path, allowing the server process to read any file that is readable by that process. This leads to unauthorized disclosure of file contents with no requirement for elevated privileges or authentication.

Affected Systems

All deployments of http4k using the ThymeleafTemplates component and running a version older than 6.62.0.0-ee are affected. The vulnerability specifically impacts the file resolution logic within the Http4k library as distributed by the http4k vendor.

Risk and Exploitability

The CVSS score of 8.2 indicates a high severity vulnerability that can be exploited remotely by sending HTTP requests containing crafted template names. Because no authentication is required and the attack vector is network‑based, attackers with network access to the application can trigger the flaw. The EPSS score is not available, and the issue is not listed in CISA KEV, but the combination of high CVSS, lack of containment checks, and unauthenticated access results in a significant risk of information leakage in environments where insecure template directories are used. The attack path is straightforward: an HTTP request to the application containing a template name with "../" segments triggers the resolver, which then reads arbitrary files from the server’s file system.

Generated by OpenCVE AI on November 2, 2026 at 03:51 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade http4k to version 6.62.0.0-ee or later, which removes the path traversal flaw in ThymeleafTemplates.
  • If an upgrade is not immediately possible, restrict the baseTemplateDir to a trusted directory and enforce strict containment checks on template paths, rejecting any names containing "..".
  • Run the http4k application under a least‑privilege user account and set file system permissions to limit the process’s readable files to only necessary directories.

Generated by OpenCVE AI on November 2, 2026 at 03:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 02 Nov 2026 02:30:00 +0000

Type Values Removed Values Added
Description http4k before 6.62.0.0-ee contains a path traversal vulnerability in ThymeleafTemplates Caching and HotReload that allows unauthenticated attackers to read files outside baseTemplateDir by supplying ../ segments in ViewModel.template() values. Attackers can influence request-driven template selection so Thymeleaf's FileTemplateResolver resolves escaped paths without containment checks, disclosing any file readable by the server process.
Title http4k before 6.62.0.0-ee Path Traversal via ThymeleafTemplates Template Resolution
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N'}

cvssV4_0

{'score': 8.2, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-11-02T02:01:14.357Z

Reserved: 2026-11-01T12:48:05.670Z

Link: CVE-2026-120316

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-11-02T03:17:29.760

Modified: 2026-11-02T03:17:29.900

Link: CVE-2026-120316

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-11-02T04:00:09Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')