Summary
SeaweedFS version 4.39 does not recheck JWT allowed_prefixes when an existing TUS upload session is accessed by its identifier. If a tenant obtains another tenant's session ID, they may read its progress, replace its contents, delete it, or complete an upload outside their permitted filer path.
Affected context
The vulnerability occurs in SeaweedFS filer deployments that enable JWT signing and TUS resumable uploads. Session creation applies path-scoping rules, but operations on an existing session through the HEAD, PATCH, and DELETE methods may rely on the session identifier without confirming that the stored target path remains within the requesting token's allowed prefixes.
Exploit preconditions
- Attack surface: SeaweedFS filer TUS resumable-upload endpoints
- Required access: A valid low-privilege tenant token and knowledge or acquisition of another upload session identifier
- Trigger point: HEAD, PATCH, or DELETE requests targeting an existing TUS session
- Why exploitation is possible: The handler does not consistently bind the session's stored target path to the caller's JWT prefix authorization after session creation
Why this happens
The underlying bug is an authorization-check inconsistency across the lifecycle of an upload session. Path authorization is applied when a session is created, but subsequent operations use a caller-controlled session identifier without revalidating the session's target path against the caller's permitted prefixes. This maps to CWE-639: Authorization Bypass Through User-Controlled Key, because access decisions can be bypassed by referencing another user's object through its identifier.
Potential impact
- An attacker may read another tenant's upload progress and size
- An attacker may overwrite upload content associated with an out-of-scope path
- An attacker may cause attacker-controlled content to be stored at a victim's filer path
- An attacker may delete other tenants' active upload sessions
- Cross-tenant data integrity and isolation may be compromised
General mitigation guidance
Mitigation generally focuses on enforcing authorization at every operation that accesses a resumable-upload session.
Common defensive patterns include:
- Revalidate the caller's token scope against the session's stored target path for HEAD, PATCH, DELETE, and completion operations
- Bind session ownership or authorization context to the session record rather than trusting the session identifier alone
- Treat opaque identifiers as lookup keys, not proof of authorization
- Apply deny-by-default access decisions when a session is missing, malformed, or outside the caller's permitted prefixes
- Limit filer and tenant identities to the minimum permissions required for their upload workflows
- Use isolated namespaces and monitoring controls to reduce cross-tenant impact
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis and code review checks ensuring authorization is repeated after object lookup
- Tests that access one tenant's session identifier with another tenant's token
- Coverage for HEAD, PATCH, DELETE, and completion paths, not only session creation
- Policy checks requiring resource ownership or scope validation before every read, write, and delete operation
- Audit monitoring for cross-tenant session access, unexpected path mismatches, and repeated failed authorization checks
- Automated security review tools that identify object references used without ownership or scope enforcement

