Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify request-influenced template parameter
-
DeliverySubmit template() value with ../ traversal segments
-
ExploitThymeleaf FileTemplateResolver resolves path outside baseTemplateDir
-
ExecutionServer reads arbitrary file
-
ImpactSensitive file contents disclosed in response
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the application to use ThymeleafTemplates(...).Caching(baseTemplateDir) or .HotReload(baseTemplateDir) AND to let request-controlled data reach the value returned by ViewModel.template() (or the ::selector suffix) - for example per-tenant, per-locale, or per-page template selection driven by a path or query parameter. Under those conditions it is remote and unauthenticated (PR:N), needing no user interaction. Key limiters: it is NOT exploitable against applications that use a fixed/non-request-derived template name, and it is specific to the Thymeleaf engine - http4k's Pug4j wrapper (via the containment check in commit 725f1b9697) and the Handlebars (4.5.5), FreeMarker, and Pebble (4.1.2) engines at their pinned versions are not affected. Impact is limited to disclosure of files readable by the server process; no write or code execution is claimed. |
| Impact | This is a credible but conditional file-disclosure flaw rather than a mass-exploitation emergency. The supplied CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) describes a remote, unauthenticated vector with high attack complexity and a present attack requirement (AT:P), and impact limited to confidentiality (VC:H; VI:N/VA:N) - consistent with arbitrary server-side file read and no write or availability effect. The vuln.today decision label is 'this_week' (not act_now/emergency), and the CVE is NOT listed in CISA KEV, so there is no confirmed active exploitation. No EPSS probability was provided in the input, so widespread-exploitation likelihood cannot be quantified here. The GHSA advisory includes a detailed, verified reproduction against http4k's real pinned Thymeleaf 3.1.5.RELEASE, so the technical defect is solidly confirmed - but the AC:H/AT:P rating reflects a real limiter: exploitation only works when the consuming application routes request-controlled data into ViewModel.template(), which the advisory explicitly states it did NOT demonstrate against a deployed http4k app. Net: a genuine, confirmed vulnerability worth patching on a near-term schedule matching the 'this_week' label, but its real-world reach depends entirely on application design, so treat raw severity (8.2) as an upper bound gated by whether request data reaches template selection. |
| Exploit ScenarioDerived | An http4k application uses ThymeleafTemplates(...).Caching or .HotReload and selects templates using a request-influenced value (e.g. per-tenant, per-locale, or per-page selection driven by a path or query parameter). A remote, unauthenticated attacker supplies a template() value containing ../ segments to escape baseTemplateDir and read the contents of any file the server process can read. A verified reproduction harness exists in the GHSA advisory against the real pinned Thymeleaf 3.1.5.RELEASE library, though it was not demonstrated end-to-end against a full deployed http4k application. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 02, 2026
Path traversal in http4k’s ThymeleafTemplates Caching and HotReload wrappers allows remote unauthenticated attackers to read files outside baseTemplateDir when an application lets request-controlled data reach ViewModel.template() or its ::selector suffix. The issue affects http4k before 6.62.0.0-ee and is conditional on request-derived template selection; Pug4j is protected by commit 725f1b9697’s containment check, and the pinned Handlebars 4.5.5, FreeMarker and Pebble 4.1.2 engines are not affected. A verified component-level reproduction is published with the advisory, but there is no CISA KEV entry or confirmed exploitation of deployed applications, and impact is limited to disclosure of files readable by the server process; the assessed priority is this_week.
RemediationAI
Upgrade to http4k 6.62.0.0-ee or later; the package data lists org.http4k:http4k-template-thymeleaf as fixed in 6.62.0.0-ee, and the vendor advisory is at https://github.com/http4k/http4k/security/advisories/GHSA-wq4x-r858-gmmj. If upgrading cannot be done immediately, do not pass request-controlled values directly into ViewModel.template(): use a fixed template name or map request values through a strict allowlist so only intended template identifiers reach Thymeleaf. Alternatively, add the same containment pattern used by Pug4jTemplates.HotReload - canonicalize baseTemplateDir and the resolved File, and reject any result that is not under the canonical base - or wrap/subclass Thymeleaf’s FileTemplateResolver to perform that check before engine.process(); also reject ../ segments and absolute/UNC paths. The trade-off is that strict validation can break legitimate per-tenant or per-locale dynamic template lookup unless those names are enumerated, and the compensating check must remain in place until the 6.62.0.0-ee upgrade is applied. Applications that use fixed, non-request-derived template names are not exploitable under the assessed preconditions.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerable code is in core/template/thymeleaf/src/main/kotlin/org/http4k/template/ThymeleafTemplates.kt. Caching and HotReload configure Thymeleaf’s FileTemplateResolver with prefix '$baseTemplateDir/', suffix '.html', and no canonical-path containment check. ThymeleafTemplateRenderer.invoke passes viewModel.template() (split only on ::) into TemplateEngine.process(), and the pinned real org.thymeleaf:thymeleaf:3.1.5.RELEASE resolver concatenates prefix + template + suffix without rejecting ../ or absolute paths. This is CWE-22 path traversal; a template value such as ../secretdir/secret resolves outside the intended base directory. The same commit 725f1b9697 added a canonicalize-and-startsWith check to Pug4jTemplates.HotReload, but never to ThymeleafTemplates. The CVE record carries CVSS 4.0 score 8.2, while the independent assessment is CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N; AC:H reflects the application-level precondition that request data must control template selection, not a race, timing condition or attacker-uncontrolled memory state. The trigger is a request-influenced template name reaching the resolver; no write, code execution or availability impact is claimed.
Know when Http4K gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Remote unauthenticated file read, but exploitation depends on the app routing request data into template() selection, so AC:H; only confidentiality is affected (C:H, I/A:N).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
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.
Technical POC Analysis
CWE-22 (Improper Limitation of a Pathname to a Restricted Directory).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A high-severity path traversal vulnerability in http4k's ThymeleafTemplates caching and hot reload wrappers (CVE-2026-120316) could allow unauthenticated attackers to read arbitrary files accessible to the server process, potentially exposing sensitive configuration, credentials, or data. Applications that derive template names from request-controlled input are at risk, making this a priority for teams using http4k with Thymeleaf in that pattern. Leadership should care because data disclosure can lead to further compromise and regulatory exposure.
No vendor-released patch identified at time of analysis. Interim mitigations: restrict request-controlled data from reaching template selection logic; implement strict allowlisting of template names; disable ThymeleafTemplates caching and hot reload wrappers if feasible; apply Pug4j containment check commit 725f1b9697 if Pug4j is used; monitor for suspicious file access patterns.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Related Vulnerabilities in http4k Path Traversal and Integrity Check Flaws
View all 2Cookie scoping bypass in the http4k client-side cookie jar (Maven org.http4k:http4k-core) causes cookies stored by Basic
Replay of captured Digest authentication credentials is possible in the http4k http4k-security-digest module (org.http4k
Host-header routing bypass in http4k (Maven artifact org.http4k:http4k-core) before 6.49.0.0, 5.42.0.0 and 4.51.0.0 lets
EUVD-2026-115005
GHSA-r83g-mhw3-hx4p
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB