Summary
SeaweedFS contains an incorrect authorization flaw in its S3-compatible object ACL handling. An authenticated principal authorized for a nested object may use PutObjectAcl to overwrite a different object at the bucket root, including its content, metadata, ownership information, and ACL.
Affected context
The issue can occur in SeaweedFS deployments that expose the S3 API and use identity policies to scope access to nested object keys. It becomes risky when an authenticated principal can invoke PutObjectAcl on an allowed nested key and the handler resolves the destination using the bucket root rather than the key's actual parent directory.
Exploit preconditions
- Attack surface: SeaweedFS S3-compatible
PutObjectAcloperation - Required access: An authenticated S3 principal with permission for a nested object key
- Trigger point: Processing an ACL update for the authorized nested key
- Why exploitation is possible: Authorization is checked against the requested key, but the updated full object entry is written to a different root-level location, bypassing the intended object-level scope
Why this happens
The vulnerability results from a mismatch between authorization and resource resolution. The handler validates access for the requested nested key but writes the complete object entry using an incorrect bucket-root location instead of the key's actual parent directory.
Because the update contains more than ACL metadata, the operation can replace an existing target object's content, metadata, owner information, and ACL. This behavior maps to CWE-863: Incorrect Authorization, where a security check does not correctly govern the resource ultimately modified.
Potential impact
- An attacker may overwrite an object outside the scope of their assigned permissions
- Existing object content and metadata could be replaced
- Ownership and ACL information could be altered
- Object-level authorization policies could be bypassed
- Applications relying on object integrity may receive tampered data
General mitigation guidance
Mitigation generally focuses on making authorization and resource resolution operate on the same canonical object identifier.
Defensive patterns include:
- Resolving and canonicalizing the complete object key before authorization and mutation
- Ensuring ACL updates modify only the intended object and only the intended ACL fields
- Separating metadata or ACL updates from content replacement operations
- Enforcing object-level policy checks again at the final write boundary
- Applying least-privilege S3 identities and minimizing write permissions
- Testing nested-key, root-key, and path-boundary behavior as part of authorization validation
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis of handlers that authorize one resource identifier but write using another
- Code review checks for path, key, or parent-directory recomputation after authorization
- Tests covering nested object keys, similarly named root-level objects, and cross-scope mutations
- Audit-log policies that flag ACL operations followed by unexpected object replacements
- API monitoring for principals performing ACL changes outside their normal object prefix
- Automated security review tools that compare authorization targets with mutation targets

