CVE-2026-120316

http4k before 6.62.0.0-ee Path Traversal via ThymeleafTemplates Template Resolution

Published Nov 2, 2026 CVSS 4.0 · 8.2 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

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 available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Http4k
Http4k http4k
Vendors & Products Http4k
Http4k http4k
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'}

Weaknesses
  • CWE-22

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

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 2, 2026, 5:38 PM
Reserved
Nov 1, 2026, 12:48 PM
Status
Deferred
Published
Nov 2, 2026, 3:17 AM
Modified
Nov 2, 2026, 6:18 PM