<?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/"><channel><title>Path-Normalization — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/path-normalization/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 02 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/path-normalization/feed.xml" rel="self" type="application/rss+xml"/><item><title>Heimdall Authorization Bypass via Path Normalization Mismatch</title><link>https://feed.craftedsignal.io/briefs/2024-01-02-heimdall-auth-bypass/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-02-heimdall-auth-bypass/</guid><description>Heimdall is vulnerable to an authorization bypass due to a path normalization mismatch between Heimdall and downstream components, potentially leading to unauthorized access and privilege escalation.</description><content:encoded><![CDATA[<p>Heimdall, a cloud-native security proxy, is susceptible to an authorization bypass vulnerability. This issue arises from a discrepancy in how Heimdall handles request paths compared to downstream components. Specifically, Heimdall performs rule matching on the raw, non-normalized request path, while downstream components might normalize dot-segments (e.g., <code>/user/../admin</code>) according to RFC 3986. This can lead to Heimdall authorizing a request based on the raw path, whereas the downstream service processes a different, normalized path, potentially bypassing intended access controls. The vulnerability affects Heimdall versions prior to 0.17.14. Exploitation is possible when using wildcards in rule matching without further constraints. This could allow attackers to access restricted resources or functionalities.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker crafts a malicious HTTP request with a path containing dot-segments (e.g., <code>/public/../user/resource</code>).</li>
<li>The request is sent to the Heimdall proxy.</li>
<li>Heimdall performs rule matching on the raw, non-normalized path (<code>/public/../user/resource</code>).</li>
<li>Heimdall incorrectly matches the request to a less restrictive rule, such as a rule for <code>/public/**</code>, due to the initial <code>/public</code> segment.</li>
<li>Heimdall authorizes the request based on the matched rule, potentially allowing anonymous access.</li>
<li>The request is forwarded to the downstream service.</li>
<li>The downstream service normalizes the request path to <code>/user/resource</code>.</li>
<li>The downstream service processes the request as <code>/user/resource</code>, bypassing the intended access controls for that resource, possibly leading to data access or privilege escalation.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows attackers to bypass access control policies enforced by Heimdall. This can lead to unauthorized access to sensitive data, modification of restricted data, invocation of privileged functionality without proper authentication or authorization, and in certain configurations, escalation of privileges. The number of potential victims depends on the deployment and configuration of Heimdall within affected environments.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the available patch to upgrade Heimdall to version 0.17.14 or later to remediate the vulnerability.</li>
<li>Implement HTTP path normalization or rejection of HTTP paths containing relative path expressions in layers in front of Heimdall, as suggested in the advisory.</li>
<li>Deploy the Sigma rule provided below to detect suspicious HTTP requests containing dot-segments (..) in the request path.</li>
<li>Configure your proxies (e.g., Envoy) to normalize paths, as described in the advisory.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>authorization-bypass</category><category>path-normalization</category><category>cloud</category></item></channel></rss>