handlebars.java FileTemplateLoader Path Traversal
High severity
GitHub Reviewed
Published
Jun 16, 2026
in
jknack/handlebars.java
•
Updated Jun 17, 2026
Description
Published to the GitHub Advisory Database
Jun 17, 2026
Reviewed
Jun 17, 2026
Last updated
Jun 17, 2026
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.
References