CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-63490

CVE-2026-63490: Path Traversal and Arbitrary File Disclosure in Handlebars.java

Alon Barad
Alon Barad
Software Engineer

Sep 3, 2026·5 min read·25 visits

Executive Summary (TL;DR)

Unauthenticated path traversal in Handlebars.java allows arbitrary file retrieval by exploiting a parser discrepancy between Java's URL resolver and template suffix enforcement.

CVE-2026-63490 is a critical path traversal vulnerability in the Spring MVC integration of Handlebars.java. It allows unauthenticated remote attackers to bypass suffix validation and retrieve arbitrary system files via crafted dynamic view names.

Vulnerability Overview

The vulnerability CVE-2026-63490 (GHSA-g29j-rwfv-h99w) represents a path traversal flaw in the handlebars-springmvc module of Handlebars.java, a Java port of the Handlebars template engine. The component integrates Handlebars template rendering into the Spring MVC framework, primarily utilizing SpringTemplateLoader and HandlebarsViewResolver to resolve templates dynamically.

The flaw permits unauthenticated remote attackers to bypass path validation mechanisms and read arbitrary files from the server's local file system or accessible classpaths. This vulnerability occurs when application endpoints dynamically determine view names based on user input without strict validation, thereby exposing an attack surface to remote network-based exploitation.

By leveraging specific URL delimiters, adversaries trigger directory navigation paths that escape the intended application templates directory. This results in the complete bypass of validation checks built to restrict access solely to safe view components.

Root Cause Analysis

The primary defect resides in a parser differential between Java's network-resource resolvers and Handlebars' suffix enforcement logic within SpringTemplateLoader. To restrict template lookup to authorized templates, Handlebars automatically appends an .hbs extension to requested view names, creating a presumed boundary where only files ending in .hbs are processed.

However, when the resource-loading process is delegated to Spring's ResourceLoader, an attacker can manipulate the path by appending URL query parameters (?) or fragment delimiters (#). Java's internal URL parser recognizes the # character as a URL fragment identifier and discards the fragment, along with the appended .hbs suffix, during the actual file-system or socket-level read. Consequently, the application resolves and reads the target file without the suffix restriction, allowing unauthorized file retrieval.

In addition, the SpringTemplateLoader did not implement any logical bounds checking to enforce directory containment. As a result, the resolved paths were allowed to reference arbitrary local directory locations outside of the configured template base directory prefix.

Code Analysis

The vulnerable code path did not perform canonical path boundary checking or URL fragment validation before retrieving resources. In the original implementation of SpringTemplateLoader.getResource(final String location), the input location was directly resolved via loader.getResource(location) without validating if the resulting URL contained unsafe URI components.

The following diagram outlines the execution path that leads to the vulnerability:

The fixing commit 61f43423a337b87db5fec1fe59f0725aaaa38df5 addresses this by applying canonical path normalization and strict URL component validation. The updated SpringTemplateLoader canonicalizes the resolved path using java.nio.file.Paths and verifies that it does not escape the defined prefix directory. Furthermore, the validateNoUnsafeUrlComponents helper function throws an exception if the resolved URL contains either a fragment or a query component.

Exploitation

Exploitation of CVE-2026-63490 requires a Spring MVC application configuration where controller view names are influenced directly by user-controlled parameters. An attacker can transmit a crafted payload over HTTP containing a URI protocol identifier and a URL fragment delimiter, such as file:/etc/passwd# or a classpath resource reference.

When the application processes this request, the controller returns the user-supplied string as the view name, which is subsequently handled by HandlebarsViewResolver. Because the template engine compiles templates using the raw contents of the resolved file, the arbitrary contents of the target file are parsed and returned directly to the user in the HTTP response.

The attack executes with the permissions of the underlying JVM process and requires no prior authentication or administrative privileges. Consequently, the exploit is reliable and has low operational complexity.

Impact Assessment

The exploitation of this path traversal vulnerability leads to unauthorized disclosure of sensitive local files and application data. Attackers can extract critical credentials, database properties, application source code, and platform configuration parameters.

Because the impact is limited to data disclosure without modifying files or causing direct denial of service, the integrity and availability impacts are rated as None. The base CVSS v3.1 score is evaluated at 7.5 (High) with a vector of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N. At this time, threat intelligence sources indicate that exploitation is limited to proof-of-concept tests and has not been widely observed in active campaign activity.

Organizations running affected modules face substantial risk of informational exposure which could lead to secondary privilege escalation attacks.

Remediation

The definitive remediation for this vulnerability is to upgrade the com.github.jknack:handlebars.java library to version 4.5.3 or later. This upgrade addresses both the web-layer view resolver parameter checking and the loader-level URL validation mechanisms.

If upgrading immediately is not feasible, developers must refactor controllers to avoid dynamic view resolution based directly on untrusted parameters. Implementing strict allowlists of permissible view names prevents users from supplying arbitrary paths. WAF-level rules can also be established to block requests containing protocol prefixes or URL fragments within parameters destined for view-name resolution.

Following the application of the upgrade, existing deployment assets should be scanned to confirm that legacy vulnerable versions of the jar file have been fully replaced.

Official Patches

jknackGit commit containing the security fix.

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS Probability
0.47%
Top 61% most exploited

Affected Systems

Applications implementing handlebars-springmvc below version 4.5.3

Affected Versions Detail

Product
Affected Versions
Fixed Version
handlebars-springmvc
jknack
< 4.5.34.5.3
AttributeDetail
CWE IDCWE-22, CWE-23, CWE-552
Attack VectorNetwork
CVSS v3.1 Score7.5 (High)
EPSS Score0.0047
ImpactArbitrary File Disclosure
Exploit StatusProof of Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1005Data from Local System
Collection
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Known Exploits & Detection

GitHubAdvisory containing PoC steps and details of the path traversal suffix bypass mechanism.

Vulnerability Timeline

Vulnerability Published
2026-08-20
Patch Released
2026-08-20

References & Sources

  • [1]GitHub Security Advisory GHSA-g29j-rwfv-h99w
  • [2]CVE-2026-63490 Detail - NVD

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•22 minutes ago•GHSA-78G4-XQWV-Q3G8
7.5

GHSA-78G4-XQWV-Q3G8: Heap-Based Buffer Overflow in Pillow (libopenjp2)

A heap-based buffer overflow vulnerability in Pillow PyPI binary wheels (versions 11.1.0 to 12.x) allows remote code execution or application crash via crafted JPEG 2000 files processed by the bundled libopenjp2 library.

Alon Barad
Alon Barad
2 views•4 min read
•about 1 hour ago•CVE-2026-109618
9.8

CVE-2026-109618: Remote Code Execution in PHP Core via Out-of-Memory longjmp() Uninitialized Memory Access

CVE-2026-109618 (dubbed PHP2Shell) is a critical vulnerability in the PHP engine core resulting from improper out-of-memory exception handling via longjmp(). When request allocation fails mid-processing, non-local control flow bypasses cleanup procedures, leaving memory structures uninitialized or in a use-after-free state during request shutdown.

Amit Schendel
Amit Schendel
9 views•5 min read
•about 1 hour ago•CVE-2026-109619
9.2

CVE-2026-109619: Remote Code Execution in PHP Core via Stale Global State Memory Corruption (PHP2Shell)

CVE-2026-109619 (PHP2Shell) is a critical Use-After-Free vulnerability in the core PHP engine caused by improper global state cleanup during out-of-memory exception handling across persistent worker requests.

Alon Barad
Alon Barad
10 views•6 min read
•about 1 hour ago•CVE-2026-113721
4.5

CVE-2026-113721: Unsafe Link Resolution in virtualenv File Generation

In Python virtualenv prior to version 21.14.9, activation script generators and configuration writers use Path.exists() before writing files. Because Path.exists() resolves symbolic links, it returns False for dangling symlinks. Consequently, virtualenv skips unlinking pre-planted symbolic links or hard links, writing data directly to target locations outside the intended virtual environment directory.

Amit Schendel
Amit Schendel
3 views•5 min read
•9 days ago•CVE-2026-87697
8.8

CVE-2026-87697: Untrusted Deserialization in .NET PresentationCore Clipboard Handling

A remote code execution vulnerability exists in Microsoft .NET due to untrusted data deserialization within the PresentationCore component. The flaw stems from implicit auto-conversion flags during clipboard data retrieval operations.

Alon Barad
Alon Barad
31 views•5 min read
•10 days ago•CVE-2026-70007
8.8

CVE-2026-70007: Out-of-Bounds Write Vulnerability in .NET Framework and WPF Subsystem

An out-of-bounds write vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio allows unauthenticated remote attackers to execute arbitrary code via crafted pixel-shader bytecode or auto-converted clipboard payloads.

Amit Schendel
Amit Schendel
19 views•6 min read