/

CVE-2026-58372

Severity:

HIGH RISK

(8.1)

Path Traversal (CWE-22) in SeaweedFS S3 Delete Handler

CVE-2026-58372

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Unauthorized Cross-Tenant Data Deletion

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

SeaweedFS before 4.34 contains a path traversal flaw in the S3 gateway's DeleteMultipleObjectsHandler, allowing directory traversal via crafted object keys in DeleteObjects XML requests.

Authenticated S3 principals with write access to a single bucket can abuse this behavior to delete arbitrary objects in other tenants' buckets when the gateway resolves paths outside the authorized bucket.

Affected context

This vulnerability arises in SeaweedFS deployments using the S3 gateway, specifically when clients invoke the multi-object delete operation (DeleteMultipleObjectsHandler).

It is most relevant in multi-tenant or multi-bucket environments where authorization decisions are tied to the requested bucket, but object keys from the request body are later translated into filer paths.

The issue manifests when directory traversal sequences (../) in object keys are normalized by the backend path resolution logic, enabling access to objects outside the caller's intended bucket scope under certain configurations.

Exploit preconditions

  • Attack surface: S3-compatible HTTP API, particularly the DeleteObjects (multi-delete) endpoint on the SeaweedFS S3 gateway.
  • Required access: Valid, authenticated S3 principal with write/delete permissions to at least one bucket on the gateway.
  • Trigger point: Submission of a DeleteObjects XML request whose object keys include ../ segments that, when resolved, traverse to other buckets' storage paths.
  • Why exploitation is possible: The validateRequestPath middleware only checks URL path variables for safety and authorization, ignoring object keys in the request body. The filer then collapses the traversal segments and resolves the underlying filesystem path, effectively allowing a confused deputy scenario where the gateway performs deletions outside the originally authorized bucket.

Why this happens

The core defect is insufficient input validation on attacker-controlled path components contained in the DeleteObjects XML request body.

While the URL-level path validation middleware attempts to enforce safe, tenant-scoped access, it does not extend its checks to object keys, which are later transformed into filer paths.

This gap allows directory traversal sequences (../) in keys to survive until filesystem resolution, matching CWE-22: Improper Limitation of a Pathname to a Restricted Directory (Path Traversal).

Conceptually, the S3 gateway acts as a confused deputy: it trusts body-supplied keys as internal paths without canonicalization or enforcement of bucket boundaries, enabling operations outside the intended authorization scope.

Potential impact

  • Authenticated tenants may delete arbitrary objects from other tenants' buckets.
  • Critical application data stored in neighboring buckets could be removed or disrupted.
  • Cross-tenant isolation guarantees can be undermined, eroding trust in shared storage deployments.
  • Backup or archival data mapped under the same filer hierarchy may also be unintentionally exposed to deletion.

General mitigation guidance

Effective mitigation focuses on tightening path handling and authorization boundaries within the S3 gateway and underlying filer.

Common defensive patterns include:

  • Applying strict canonicalization and normalization of all path segments derived from request bodies before use.
  • Enforcing bucket and tenant boundaries after path resolution, ensuring that resolved paths cannot escape their configured root directories.
  • Rejecting object keys that contain ../, absolute path prefixes, or other traversal patterns as part of API input validation.
  • Designing gateway components so that authorization decisions are made over fully-resolved, canonical paths rather than partially trusted inputs.
  • Minimizing the gateway's effective privileges on backend storage, so that even if traversal occurs, the impact surface is reduced.

How teams detect issues like this

Organizations can detect similar path traversal risks by:

  • Using static analysis or linters to flag direct concatenation of user-supplied strings into filesystem or filer paths, especially in gateway or API layers.
  • Reviewing code for inconsistencies where middleware validates URL paths but does not apply equivalent checks to request bodies or query parameters.
  • Implementing security-focused integration tests that attempt directory traversal via object keys and other secondary inputs on S3-compatible endpoints.
  • Applying centralized logging and anomaly detection for multi-delete operations that target unexpected directories or cross-bucket paths.

Sources

SourceLink
github.comgithub.com/geo-chen/oss/blob/main/seaweedfs.md
github.comgithub.com/seaweedfs/seaweedfs/commit/0345658ea8e7c6a3948ad190634b00866ec244c9
github.comgithub.com/seaweedfs/seaweedfs/pull/9931
github.comgithub.com/seaweedfs/seaweedfs/releases/tag/4.34
github.comgithub.com/seaweedfs/seaweedfs/security/advisories/GHSA-w62w-66v9-vvgv
vulncheck.comvulncheck.com/advisories/seaweedfs-cross-bucket-object-deletion-via-deleteobjects-request-body-keys

Frequently asked

questions

No. Although the attacker must have write access to at least one bucket, crafted traversal sequences in object keys can cause deletions in other tenants' buckets when bucket boundaries are not enforced on resolved paths.

The attacker needs valid S3 authentication and sufficient permissions to perform multi-object delete operations on at least one bucket exposed by the SeaweedFS S3 gateway.

The safest approach is to canonicalize and validate all path components originating from client input, reject traversal patterns outright, and strictly enforce per-bucket root directories after path resolution so that no request can escape its assigned scope.

Design APIs so that authorization checks apply uniformly to all sources of path input (URL, body, headers), use secure-by-default path resolution helpers that enforce root directories, and incorporate security reviews and automated tests that explicitly probe for traversal and cross-tenant access conditions.

Find out what's already
exploitable in your codebase.