http4k before 6.62.0.0-ee Path Traversal via ThymeleafTemplates Template Resolution
Affects http4k before 6.62.0.0-ee when views are rendered with ThymeleafTemplates Caching or HotReload using a baseTemplateDir and template names are influenced by request data. Fixed in 6.62.0.0-ee.
Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.
- Exploited
- No known exploitation
- Fix
- Fixed in 6.62.0.0-ee
- Who is exposed
- Not reported
Do first: Upgrade to a fixed version: 6.62.0.0-ee.
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- Published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- A 0-100 score for how much a CVE matters across the industry: exploitation, exposure, how widely the software is used, severity and whether a fix exists.What do these mean? →
- 15/100 · provisional
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Unclear
- Fix
- Fixed in 6.62.0.0-ee
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: partial
Summary
http4k, an open-source Kotlin toolkit for building HTTP applications, is affected when using its Thymeleaf template integration with caching or hot reload enabled. An unauthenticated attacker could exploit this flaw to read arbitrary files that the server process can access, potentially exposing sensitive data such as configuration files or credentials.
Read the original 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.
What to do
Upgrade to a fixed version: 6.62.0.0-ee.
Timeline
- CVE published
- First seen by cve.now
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: partial
- Record last updated
Affected versions
- http4k http4k
fixed in 6.62.0.0-ee
Evidence 2
- Advisory
- Link
Corrections
None so far.
Something wrong on this page? Report an error. Every fix is listed here.
Questions about CVE-2026-120316
What does this mean?
A crafted template name can make the template resolver read files outside the configured baseTemplateDir. Any file the server process can read may be exposed.Source: github.com, vulncheck.com
Am I affected, and how do I check?
Versions of http4k before 6.62.0.0-ee are affected, but only where the app uses ThymeleafTemplates with Caching or HotReload and a baseTemplateDir, and a ViewModel template() value or its ::selector suffix is influenced by request data. To check, look at the http4k version in the build file and search the code for ThymeleafTemplates(...).Caching or .HotReload calls.Source: github.com, vulncheck.com
What should I do about it?
Upgrade http4k to 6.62.0.0-ee or later.Source: github.com, vulncheck.com
Is it being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data