Skip to main content
← Vulnerabilities

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.

8.2HighCNA
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.

Published
Last modified
Published
Not listed in CISA KEV
15/100 · provisional
Unclear
Fix
Fixed in 6.62.0.0-ee
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

  1. CVE published
  2. First seen by cve.now
  3. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  4. Record last updated

Affected versions

  • http4k http4k

    fixed in 6.62.0.0-ee

Evidence 2

  1. Advisory
  2. Link

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

FAQ

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