HIGH 7.5

CVE-2026-55760

handlebars.java FileTemplateLoader Path Traversal

Description

Impact

Any application that passes user-controlled input to Handlebars.compile() using a FileTemplateLoader (or ClassPathTemplateLoader) is vulnerable to arbitrary file read. This is a realistic attack surface for web applications that use template names from URL path parameters, request parameters, or other user-controlled sources.

Patches

com.github.jknack:handlebars:4.5.2

Workarounds

Validate template name is derived from user input.

if (!file.getPath().startsWith(new File(prefix).getCanonicalPath())) {
throw new IOException("Path traversal attempt detected: " + location);
}

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
com.github.jknack » handlebars
< 4.5.2
4.5.2

Blast radius

1affected artifacts
63affected versions
3,307dependent artifacts (est.)
190,914dependent versions

73% of the dependent artifacts (2,421) still pull an affected version in their latest release.

DepthDependent versions
Direct
15,976
2 hops
37,061
3 hops
31,439
4 hops
79,280
5 hops
23,199
6 hops
3,959

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.