<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Spring-Mvc - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/spring-mvc/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 03 Sep 2026 00:03:54 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/spring-mvc/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>Arbitrary File Read in Handlebars.java SpringTemplateLoader via URL Fragment Bypass</title><link>https://feed.craftedsignal.io/briefs/2026-09-handlebars-spring-lfi/</link><pubDate>Thu, 03 Sep 2026 00:03:54 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-09-handlebars-spring-lfi/</guid><description>An unauthenticated arbitrary file read vulnerability (CVE-2026-63490) exists in handlebars-springmvc &lt; 4.5.3 due to insufficient validation of user-influenced view names, allowing attackers to bypass file suffix restrictions using URL fragments.</description><content:encoded><![CDATA[<p>Handlebars.java version 4.5.3 and earlier is vulnerable to an arbitrary file read vulnerability (CVE-2026-63490) within the <code>SpringTemplateLoader</code> component. The vulnerability arises because <code>SpringTemplateLoader</code> trusts Spring's <code>ResourceLoader</code> to resolve view names without applying the path-containment checks implemented in other loaders. The security boundary protecting the system relies on an unconditional <code>.hbs</code> suffix appended by <code>AbstractTemplateLoader</code>.</p>
<p>Attackers can bypass this suffix check by appending a URL fragment (<code>#</code>) to a user-influenced view name. Spring and the JDK treat the content following the fragment as metadata and discard it during resource resolution, effectively stripping the <code>.hbs</code> extension. This allows an attacker to manipulate the view path to point to arbitrary files on the filesystem readable by the JVM process. Successful exploitation leads to unauthenticated access to sensitive system files, including configuration files, API keys, CI/CD secrets, and service account tokens. This is particularly critical in Spring MVC applications that resolve view names based on user input.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies a Spring MVC controller endpoint that returns a view name derived from user input (e.g., via query parameter or path variable).</li>
<li>Attacker crafts a malicious view name request containing a protocol prefix (e.g., <code>file:</code>) and the target file path.</li>
<li>Attacker appends a <code>#</code> character to the end of the path (e.g., <code>file:/etc/passwd#</code>).</li>
<li><code>HandlebarsViewResolver</code> passes the attacker-influenced string to the <code>handlebars.compile()</code> method.</li>
<li><code>SpringTemplateLoader</code> processes the path, and <code>AbstractTemplateLoader</code> appends <code>.hbs</code> after the <code>#</code> fragment.</li>
<li>Spring's <code>ResourceLoader</code> resolves the path, discarding the fragment part (<code>#.hbs</code>).</li>
<li>The application parses and renders the contents of the target file as a Handlebars template.</li>
<li>The HTTP response body returns the contents of the sensitive file to the attacker.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows unauthenticated attackers to read sensitive files accessible to the application process UID. This includes, but is not limited to, <code>application.yml</code> files containing database credentials and secret keys, cloud environment credentials (AWS/GCP), Kubernetes service account tokens, private keys, and environment variables. These primitives enable full-system compromise, lateral movement within a network, or escalation of privileges in cloud-native environments.</p>
<h2 id="recommendation">Recommendation</h2>
<p>Prioritize patching to version 4.5.3 or later of <code>handlebars-springmvc</code>. For applications where immediate patching is not possible, implement input validation in the view resolver to reject view names containing prohibited characters.</p>
<ul>
<li>Upgrade the <code>com.github.jknack:handlebars-springmvc</code> dependency to version 4.5.3 or higher to incorporate the fix for CVE-2026-63490.</li>
<li>Implement an input validation layer in <code>HandlebarsViewResolver.configure</code> to detect and reject view names containing <code>:</code> or <code>#</code> characters.</li>
<li>Conduct a code audit of all Spring MVC controllers to identify and refactor patterns where user input influences view names or template paths.</li>
<li>Restrict file access for the JVM process to only necessary directories to minimize the impact of potential arbitrary file read primitives.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>cve-2026-63490</category><category>arbitrary-file-read</category><category>spring-mvc</category><category>template-injection</category></item></channel></rss>