<?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>S3-Proxy — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/s3-proxy/</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>Wed, 03 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/s3-proxy/feed.xml" rel="self" type="application/rss+xml"/><item><title>S3-Proxy Authentication Bypass via Percent-Encoded Slashes</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-s3-proxy-auth-bypass/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-03-s3-proxy-auth-bypass/</guid><description>S3-Proxy is vulnerable to an authentication bypass due to inconsistent handling of percent-encoded slashes between the authentication middleware and bucket handler, allowing unauthorized access to protected resources.</description><content:encoded><![CDATA[<p>S3-Proxy is vulnerable to an authentication bypass due to differing interpretations of URL paths. The auth middleware uses the encoded path (<code>r.URL.RequestURI()</code>), while the bucket handler uses the decoded path (<code>r.URL.Path</code>). This discrepancy allows attackers to craft requests containing percent-encoded slashes (<code>%2F</code>) to bypass authentication checks. Specifically, the <code>*</code> wildcard in resource paths, when used without a separator, matches across forward slashes, further exacerbating the issue. This can lead to unauthorized modification or deletion of objects in protected namespaces. Successful exploitation requires a vulnerable S3-Proxy configuration and allows attackers to bypass intended access controls. The issue was reported on 2026-05-05.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies an S3-Proxy instance with vulnerable resource path configurations.</li>
<li>The attacker crafts a PUT request with a URL containing a percent-encoded slash (<code>%2F</code>) within a path segment, such as <code>/upload/foo%2Frestricted/drafts/</code>.</li>
<li>The request is received by the S3-Proxy server.</li>
<li>The auth middleware uses <code>r.URL.RequestURI()</code> and matches the path against configured resource paths. Due to the encoded slash, the wildcard <code>*</code> matches the entire segment <code>foo%2Frestricted</code>.</li>
<li>The bucket handler uses <code>r.URL.Path</code>, which decodes the <code>%2F</code> into a <code>/</code>, resulting in the path <code>/upload/foo/restricted/drafts/</code>.</li>
<li>The request bypasses authentication because the auth middleware incorrectly matched an open route due to the encoded path.</li>
<li>The bucket handler constructs an S3 key based on the decoded path, leading to the object being written to the protected <code>restricted</code> namespace without proper authentication.</li>
<li>The attacker successfully writes an object to the protected namespace without credentials.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows unauthorized users to bypass authentication controls and access protected resources within the S3-Proxy environment. This can result in unauthorized data modification, deletion, or exfiltration. The impact is significant as it undermines the intended access control mechanisms, potentially leading to data breaches or service disruption. The number of affected installations is unknown.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the fix by setting the separator argument to <code>'/'</code> in <code>glob.Compile</code> to prevent the wildcard <code>*</code> from matching across path segments as described in Issue 1.</li>
<li>Implement Option B, using <code>r.URL.EscapedPath()</code> in the bucket handler to ensure consistent handling of encoded paths and prevent namespace pollution as outlined in Issue 2.</li>
<li>Deploy the Sigma rule &ldquo;S3-Proxy Percent Encoded Slash in URI&rdquo; to detect requests containing <code>%2F</code> in the URI, which may indicate exploitation attempts.</li>
<li>Review and update all resource path definitions to ensure they correctly reflect the intended access controls after applying the fixes, as the fixes represent a breaking change in path interpretation.</li>
<li>Enable webserver logging to capture the full URI path (including encoded characters) for analysis and detection, to facilitate effective monitoring using the Sigma rules provided.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>s3-proxy</category><category>authentication-bypass</category><category>url-encoding</category></item></channel></rss>