Summary
Uber Kraken does not properly validate the tag parameter used by the /tags/{tag} endpoint, allowing directory traversal beyond the configured storage root. An unauthenticated attacker may use percent-encoded parent directory segments to read files accessible to the testfs backend process.
Affected context
The vulnerability occurs in Uber Kraken deployments using the affected tags endpoint and a testfs storage backend. It becomes risky when the tag value is incorporated into filesystem paths without reliably constraining the resolved path to the configured storage root.
Exploit preconditions
- Attack surface: The
/tags/{tag}HTTP endpoint - Required access: No authentication is required
- Trigger point: Processing a request containing a crafted tag value
- Why exploitation is possible: Insufficient validation and canonicalization
can allow encoded parent-directory segments to resolve outside the intended
storage directory
Why this happens
The underlying bug is improper limitation of a user-controlled path component. When the tag parameter is decoded and used in filesystem operations without canonical path validation or an equivalent confinement mechanism, traversal segments may escape the configured storage root. This behavior maps to CWE-22, Improper Limitation of a Pathname to a Restricted Directory.
Potential impact
- An attacker may read arbitrary files accessible to the backend process
- Sensitive configuration, credentials, or application data could be exposed
- File disclosure could support follow-on compromise of dependent services
- The confidentiality of the host or container filesystem may be reduced
General mitigation guidance
Mitigation generally focuses on treating tag values as untrusted identifiers
rather than filesystem paths.
Common defensive patterns include:
- Resolve candidate paths canonically and verify they remain beneath the
intended storage root
- Reject traversal indicators after consistent URL decoding and normalization
- Prefer opaque, allowlisted identifiers mapped to server-controlled paths
- Use filesystem APIs that constrain access to an approved directory where
available
- Run the backend with the minimum filesystem permissions required
- Avoid exposing sensitive files through storage backends or HTTP responses
How teams detect issues like this
Detection approaches may include:
- Static analysis for user-controlled values reaching filesystem path APIs
- Code review checks for missing canonicalization and root-containment tests
- Dynamic testing with encoded traversal variants and normalization edge cases
- Web-application policies that alert on traversal sequences and unusual
encoded path components
- Automated security review tools that identify path construction from request
parameters

