Skip to main content

http4k Thymeleaf CVE-2026-120316

| EUVDEUVD-2026-115005 HIGH
Path Traversal (CWE-22)
2026-11-02 VulnCheck GHSA-r83g-mhw3-hx4p
8.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify request-influenced template parameter
  2. Delivery
    Submit template() value with ../ traversal segments
  3. Exploit
    Thymeleaf FileTemplateResolver resolves path outside baseTemplateDir
  4. Execution
    Server reads arbitrary file
  5. Impact
    Sensitive 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

http4k 0 <6.62.0.0-ee

Affected Packages

euvd http4k fix: 6.62.0.0-ee

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

Vendor (VulnCheck) PRIMARY 8.2 HIGH
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
vuln.today AI 5.9 MEDIUM

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

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Nov 02, 2026 - 04:16 EUVD
CVE Published
Nov 02, 2026 - 02:01 cve.org
HIGH 8.2

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.3%
Top 76% exploitable
Prevalence
Low
niche Kotlin HTTP framework; only the Thymeleaf template module is affected
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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 2

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy