Summary
SeaweedFS filer authorization could incorrectly treat paths sharing a textual prefix as being within the same authorized tenant scope. A valid token scoped to one tenant could therefore permit reads or writes to similarly named sibling paths when the affected authorization logic was used.
Affected context
The issue occurs in SeaweedFS filer deployments using JWT-based path authorization with the affected allowed-prefix checking logic. It is relevant when tenant or directory boundaries are represented by similar path strings and authorization is evaluated against raw, unnormalized prefixes rather than complete path components. Versions before 4.24 are within the reported affected range.
Exploit preconditions
- Attack surface: SeaweedFS filer HTTP or API operations protected by path-scoped JWT authorization
- Required access: A valid token authorized for a narrower tenant or directory path
- Trigger point: Authorization checks for reads or writes involving a sibling path with the same textual prefix
- Why exploitation is possible: A raw string-prefix comparison can consider paths such as
/tenant1-oldor/tenant1234to be within the scope of/tenant1without enforcing a directory-boundary match
Why this happens
The authorization logic used a generic string-prefix comparison to determine whether a requested path belonged to an allowed path scope. Because textual prefixes do not necessarily represent complete path components, a permitted path such as /tenant1 could unintentionally match unrelated sibling paths with the same beginning. This is an improper authorization condition mapped to CWE-863, where access-control decisions fail to correctly enforce the intended resource boundary.
Potential impact
- An authenticated tenant user may read data belonging to another tenant
- An authenticated tenant user may modify or delete data outside the intended scope
- Cross-tenant isolation may be weakened
- Sensitive stored content or metadata could be exposed
- Unauthorized changes could affect data integrity and downstream services
General mitigation guidance
Mitigation generally focuses on making authorization decisions over normalized,
component-aware resource identifiers rather than raw textual prefixes.
Common defensive patterns include:
- Matching complete path components and explicit directory boundaries
- Canonicalizing paths before authorization decisions
- Applying deny-by-default authorization for resources outside the exact scope
- Separating tenant identifiers from free-form path strings where practical
- Limiting tokens to the smallest necessary resource and operation set
- Testing sibling-name and boundary cases as part of authorization verification
- Using isolated storage namespaces and least-privilege service permissions
- Preventing authorization checks from relying solely on client-supplied path forms
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis rules that flag raw prefix comparisons in access-control code
- Code review checks for authorization decisions based on unnormalized paths
- Tests covering sibling names, trailing separators, encoded forms, and nested paths
- Policy tests confirming that tokens cannot cross tenant or directory boundaries
- Runtime monitoring for a token accessing resources outside its declared scope
- Automated security review tools that identify potentially incomplete path-boundary checks

