Skip to main content

handlebars.java EUVDEUVD-2026-42352

| CVE-2026-55760 HIGH
Path Traversal (CWE-22)
2026-06-17 https://github.com/jknack/handlebars.java GHSA-r4gv-qr8j-p3pg
7.5
CVSS 3.1 · Vendor: https://github.com/jknack/handlebars.java
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify endpoint passing user input to Handlebars.compile()
  2. Delivery
    Send request with ../ traversal in template name
  3. Exploit
    FileTemplateLoader resolves path outside prefix
  4. Execution
    Library reads target file as template source
  5. Impact
    Sensitive file contents returned in response or error

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application (a) embeds com.github.jknack:handlebars at a version below 4.5.2, (b) instantiates a FileTemplateLoader or ClassPathTemplateLoader, and (c) passes attacker-controllable data - typically a URL path segment, query parameter, form field, or header value - as the template name argument to Handlebars.compile(). Limiting factors are significant: applications that hardcode template names, use a non-filesystem loader, or pre-validate the template parameter against an allowlist are not exploitable, and the impact is bounded to files readable by the JVM process user (confidentiality only, per C:H/I:N/A:N). No authentication or user interaction is required by the library itself (PR:N/UI:N), but the practical reachability depends on whether a vulnerable code path is exposed on a public endpoint.

Impact

The CVSS 3.1 vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N (7.5 High) reflects unauthenticated network exploitation with low complexity and a confidentiality-only impact, which matches an arbitrary file read primitive. Real-world risk is conditional rather than universal: exploitability requires that an application actually feed user-controlled input into Handlebars.compile() with a filesystem-backed loader, so many handlebars.java deployments that load templates from static, hardcoded names are not exposed. No EPSS score, KEV listing, or public PoC was provided in the input, so this is no public exploit identified at time of analysis and exploitation is not confirmed in the wild; however, the pattern (path traversal in a widely embedded Java templating library) is trivial to weaponize once a vulnerable code path is identified, and confidentiality loss can include configuration, secrets, and source files on the classpath. Treat as a meaningful supply-chain dependency upgrade rather than an emergency patch unless a SAST review confirms user input reaches Handlebars.compile().

Exploit ScenarioDerived

A web application exposes an endpoint such as /render?template=welcome that forwards the template parameter into Handlebars.compile() backed by a FileTemplateLoader rooted at /opt/app/templates. An unauthenticated attacker sends /render?template=../../../../etc/passwd (or a classpath equivalent like ../../../../application.properties), causing the loader to read and return the targeted file as template content, disclosing credentials, configuration, or source code; no public PoC is referenced in the advisory but the technique follows standard CWE-22 patterns and the CVSS AC:L/PR:N/UI:N vector confirms the path is trivially reachable.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 18, 2026

Arbitrary file read in jknack handlebars.java versions prior to 4.5.2 allows remote unauthenticated attackers to retrieve files outside the intended template directory when applications pass user-controlled input to Handlebars.compile() with a FileTemplateLoader or ClassPathTemplateLoader. The flaw stems from missing path canonicalization in the template loaders, enabling classic ../ traversal sequences to escape the configured template prefix. No public exploit identified at time of analysis, but the GitHub Security Advisory GHSA-r4gv-qr8j-p3pg documents the issue and the fix is available in 4.5.2.

RemediationAI

Vendor-released patch: com.github.jknack:handlebars 4.5.2 - upgrade the Maven dependency to 4.5.2 or later as the primary fix, per GHSA-r4gv-qr8j-p3pg (https://github.com/jknack/handlebars.java/security/advisories/GHSA-r4gv-qr8j-p3pg). If an immediate upgrade is not possible, apply the workaround documented in the advisory by validating that the resolved template file's canonical path starts with the canonical path of the configured prefix (for example, throw an IOException when file.getPath() does not begin with new File(prefix).getCanonicalPath()), which blocks ../ traversal at the cost of rejecting any legitimately symlinked template trees. As a complementary control, refactor callers so that template names supplied by users are mapped through a strict allowlist or enum rather than passed directly into Handlebars.compile(); this eliminates the attack surface entirely but requires code changes in every endpoint that selects templates dynamically.

Affected VersionsENISA

handlebars.java < 4.5.2

Affected Packages

maven com.github.jknack:handlebars fix: 4.5.2
euvd handlebars_java fix: 4.5.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in maven, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

handlebars.java is a Java port of the Handlebars.js logic-less templating engine, distributed as the Maven artifact com.github.jknack:handlebars (pkg:maven/com.github.jknack:handlebars per CPE data). Templates are resolved via TemplateLoader implementations; FileTemplateLoader resolves names against a filesystem prefix directory and ClassPathTemplateLoader resolves them against the classpath. The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), where the loaders concatenate the prefix with a caller-supplied template name without verifying that the resulting canonical path remains under the prefix, so embedded ../ segments traverse out of the template root and read arbitrary files the JVM process can access.

Know when Java gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/jknack/handlebars.java) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 7.5 HIGH

Network-reachable template parameter, no auth or interaction, trivial ../ payload; arbitrary file read yields high confidentiality impact with no integrity or availability effect.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE HIGH

Primary rating from Vendor (https://github.com/jknack/handlebars.java).

CVSS VectorVendor: https://github.com/jknack/handlebars.java

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

DescriptionCVE.org

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.

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

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 34 maven packages depend on com.github.jknack:handlebars (17 direct, 17 indirect)

Ecosystem-wide dependent count for version 4.5.2.

Executive ViewAI

Why It Matters

A file read vulnerability in jknack handlebars.java (versions prior to 4.5.2) allows unauthenticated attackers to access files outside designated template directories through path traversal, potentially exposing sensitive configurations, credentials, and source code. Any organization using this widely-deployed template engine for user-controlled input is at risk without immediate remediation. Exploitation requires no authentication or special privileges, making this a high-priority patch deployment.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 67% exploitable
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

58
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

More in Java

View all
CVE-2012-4681 CRITICAL POC
9.8 Aug 28

Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m

CVE-2015-7450 CRITICAL POC
9.8 Jan 02

Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti

CVE-2013-2465 CRITICAL POC
9.8 Jun 18

Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2010-1871 HIGH POC
8.8 Aug 05

JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to

CVE-2012-1723 CRITICAL POC
9.8 Jun 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2015-4852 CRITICAL POC
9.8 Nov 18

The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers

CVE-2012-5076 CRITICAL POC
9.8 Oct 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow

CVE-2017-3066 CRITICAL POC
9.8 Apr 27

Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla

CVE-2012-0391 CRITICAL POC
9.8 Jan 08

The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy