high · CVSS v3 5.9 · CVSS v4 8.2

CVE-2026-120316

CVE-2026-120316 is a path traversal vulnerability in http4k's ThymeleafTemplates Caching and HotReload that allows unauthenticated attackers

Overview

CVE-2026-120316 is a path traversal vulnerability in http4k's ThymeleafTemplates Caching and HotReload that allows unauthenticated attackers to read arbitrary files on the server by manipulating template names. The flaw exists in all versions before 6.62.0.0-ee and can expose any file readable by the server process.

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.

Impact

Confidentiality: attackers can read any file readable by the server process, potentially exposing sensitive data. Integrity and availability are not directly impacted. Defenders include application owners, DevOps, and security teams who must address the flaw.

Remediation

Upgrade http4k to version 6.62.0.0-ee or later. If an upgrade is not immediately possible, disable ThymeleafTemplates Caching and HotReload or restrict the baseTemplateDir to a safe location and enforce strict path validation. Additionally, apply file system permissions to limit the server process’s read access to only necessary files.

Risk context

The vulnerability has a high severity rating with a CVSS v4 score of 8.2, indicating a significant risk level. Immediate attention and remediation are recommended to prevent potential data exposure.

Affected products

  • http4k

Scores

Severity
high
CVSS v2
5.4
CVSS v3
5.9
CVSS v4
8.2
EPSS
—

path-traversal Thymeleaf http4k file-read high-severity

← All CVEs