CVE-2026-120316
Deferred Deferred - Pending Action

Path Traversal in http4k ThymeleafTemplates

Vulnerability report for CVE-2026-120316, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-02

Last updated on: 2026-11-02

Assigner: VulnCheck

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-02
Last Modified
2026-11-02
Generated
2026-11-02
AI Q&A
2026-11-02
EPSS Evaluated
N/A
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
http4k http4k 0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a path traversal vulnerability in http4k versions before 6.62.0.0-ee affecting the ThymeleafTemplates component. It allows unauthenticated attackers to read arbitrary files outside the intended baseTemplateDir by supplying ../ segments in ViewModel.template() values. The issue occurs because Thymeleaf's FileTemplateResolver resolves escaped paths without proper containment checks, enabling attackers to manipulate template selection and access files readable by the server process.

Detection Guidance

Check http4k version with: mvn dependency:tree | grep http4k. If version is below 6.62.0.0-ee, the system is vulnerable. Inspect application logs for unusual template resolution attempts containing ../ segments in ViewModel.template() values.

Impact Analysis

An attacker could exploit this to read sensitive files on the server, such as configuration files, source code, or other confidential data accessible by the http4k process. This could lead to information disclosure, potential data breaches, or further attacks if credentials or keys are exposed.

Compliance Impact

This vulnerability could lead to unauthorized access to personal or sensitive data, violating GDPR's data protection principles and HIPAA's security requirements for protected health information. Organizations may face compliance violations, fines, or legal consequences if exploited.

Mitigation Strategies

Upgrade http4k to version 6.62.0.0-ee or later immediately. If upgrading is not possible, implement path containment checks in ThymeleafTemplates similar to those in Pug4jTemplates to validate template paths before resolution.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-120316. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...