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)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| com.github.jknack » handlebars | < 4.5.2 | 4.5.2 |
Blast radius
73% of the dependent artifacts (2,421) still pull an affected version in their latest release.
| Depth | Dependent 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
- org.apache.spark » spark-core2,899 usages
- com.github.tomakehurst » wiremock1,838 usages
- com.github.tomakehurst » wiremock-jre81,180 usages
- org.wiremock » wiremock733 usages
- org.apache.hive » hive-exec699 usages
- com.vaadin » vaadin-core640 usages
- org.apache.spark » spark-hive633 usages
- org.openapitools » openapi-generator-maven-plugin618 usages
- com.vaadin » vaadin-maven-plugin600 usages
- org.apache.hive » hive-metastore480 usages
- org.apache.hadoop » hadoop-minicluster475 usages
- org.apache.hive » hive-jdbc404 usages
- com.vaadin » vaadin378 usages
- org.jsonschema2pojo » jsonschema2pojo-maven-plugin334 usages
- org.apache.hive » hive-common305 usages
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.
References
| Package | jknack/handlebars.java | github.com |
| Web | jknack/handlebars.java advisory GHSA-r4gv-qr8j-p3pg | github.com |
