CVE-2026-42882 in s3-proxy
Summary
by MITRE • 05/11/2026
oxyno-zeta/s3-proxy is an aws s3 proxy written in go. Prior to 5.0.0, s3-proxy contains an authentication bypass caused by inconsistent URL path interpretation between the authentication middleware and the bucket handler. The authentication middleware evaluates resource path patterns against the percent-encoded request URI (r.URL.RequestURI()), while the bucket handler constructs S3 object keys from the decoded path (r.URL.Path). This mismatch, combined with the glob library being invoked without a path separator (causing * to match across / boundaries), allows unauthenticated attackers to write to, read from, or delete objects in protected S3 namespaces. Exploitation is possible via three techniques: (1) using * patterns that match across path separators to reach protected routes via path traversal (e.g., /open/foo/drafts/../restricted/), (2) using percent-encoded slashes (%2F) to collapse multiple path segments into a single token at the auth layer while the decoded form resolves to a protected namespace at the storage layer, and (3) using dot-dot segments (../) under ** prefix patterns, where the raw path matches an open route while Go's URL parser resolves the traversal to a protected path before the bucket handler runs. An unauthenticated attacker with network access can perform unauthorized PUT, GET, or DELETE operations on objects in authentication-protected S3 namespaces. This vulnerability is fixed in 5.0.0.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 05/16/2026
The oxyno-zeta/s3-proxy project represents a go-based aws s3 proxy implementation that suffered from a critical authentication bypass vulnerability affecting versions prior to 5.0.0. This vulnerability stems from a fundamental inconsistency in how URL paths are processed within the application's authentication and storage layers, creating a security gap that allows unauthorized access to protected s3 namespaces. The authentication middleware component evaluates resource path patterns against the percent-encoded request URI using r.URL.RequestURI(), while the bucket handler constructs s3 object keys from the decoded path using r.URL.Path. This architectural mismatch creates a dangerous condition where path validation occurs against one representation while actual storage operations reference another, fundamentally undermining the security controls designed to protect sensitive data.
The technical flaw manifests through the glob library's improper invocation without path separator consideration, enabling the wildcard character to match across directory boundaries. This behavior creates multiple attack vectors that exploit the path interpretation discrepancy between authentication and storage layers. The vulnerability operates through three distinct exploitation techniques that leverage different aspects of URL path handling. The first technique utilizes glob patterns that match across path separators to perform path traversal attacks, allowing attackers to navigate from open to restricted routes using sequences like /open/foo/drafts/../restricted/. The second approach employs percent-encoded slashes (%2F) to collapse multiple path segments into single tokens at the authentication layer while maintaining the original multi-segment structure at the storage layer, effectively bypassing access controls. The third vector exploits dot-dot segments (../) under * prefix patterns where the raw path matches an open route while go's url parser resolves the traversal to a protected path before the bucket handler executes, creating a temporal window for unauthorized operations.
This authentication bypass vulnerability directly maps to CWE-285: Improper Authorization, which specifically addresses situations where authorization checks fail to properly validate access rights. The issue also aligns with ATT&CK technique T1078: Valid Accounts, as it allows attackers to leverage legitimate s3 access patterns to perform unauthorized operations without proper authentication credentials. The operational impact of this vulnerability extends beyond simple unauthorized access, as it enables complete compromise of s3 namespace integrity through unauthorized PUT, GET, or DELETE operations. An unauthenticated attacker with network access can effectively gain complete control over objects within authentication-protected s3 namespaces, potentially leading to data exfiltration, data corruption, or complete service disruption. The vulnerability's severity is amplified by its automatic exploitation potential, as the attack techniques require no special privileges beyond network connectivity and do not depend on user interaction or complex attack chains.
The remediation approach required for this vulnerability involves upgrading to version 5.0.0, which addresses the path interpretation inconsistency by ensuring that both authentication middleware and bucket handler operate on consistent path representations. The fix likely implements proper path normalization and validation that maintains consistency between encoded and decoded path processing, eliminates the glob library's cross-separator matching behavior, and ensures that path traversal attempts are properly validated at all layers of the application. Security practitioners should implement comprehensive monitoring for unauthorized s3 operations and conduct thorough testing to verify that the upgrade resolves the path interpretation issues without introducing regressions in legitimate functionality. Organizations using this s3 proxy should also review their s3 bucket policies and access controls to ensure that additional security layers are in place to protect against potential exploitation attempts during the transition period.