Overview

SeaweedFS, a distributed file system, has been found vulnerable to a path traversal attack in its S3 API gateway and Iceberg REST catalog gateway. This vulnerability, tracked as CVE-2026-54917, allows an attacker to access buckets and objects outside their authorized scope, potentially leading to data breaches or unauthorized data modifications.

Understanding the Vulnerability / Threat

Root Cause Analysis

The root cause of this vulnerability lies in how the S3 API gateway and Iceberg REST catalog gateway construct their routers. Specifically, they use `mux.NewRouter().SkipClean(true)`, which disables path cleaning. As a result, URL segments like `..` are not normalized during routing, allowing an attacker to craft requests that traverse directory structures. The captured path variables were not validated for traversal segments before reaching the handlers. This meant that bucket isolation relied on downstream checks rather than the path itself, leading to a vulnerability that can be exploited for cross-bucket access. This issue falls under CWE-22, Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

Attack Surface & Vector

The vulnerability is accessible through the S3 API gateway and the Iceberg REST catalog gateway. An attacker can exploit this vulnerability by crafting specific HTTP requests that include `..` segments in the URL path. These requests can be made with or without authentication, depending on the configuration of the SeaweedFS instance.

Exploitation Mechanics — Scenario Walkthrough

Scenario: Compromising a Corporate SeaweedFS Instance 1. Initial Position: An attacker with access to a SeaweedFS instance configured with authentication disabled (`enableAuth=false`) or with limited access to a specific bucket. 2. Triggering the Flaw: The attacker crafts a GET request to `/bucket-A/../evil-bucket/secret.txt`. The `..` segment in the URL allows the request to traverse to a different bucket than the one specified in the request path. 3. What Breaks: The security boundary that is supposed to isolate buckets fails. The request is processed as if it were accessing `evil-bucket/secret.txt`, bypassing the intended bucket isolation. 4. Attacker's Prize: The attacker gains unauthorized access to read or write objects in `evil-bucket`, potentially leading to data exfiltration or corruption.

Real-World Impact

The impact of this vulnerability can be significant, especially in environments where strict bucket isolation is crucial. An attacker could exploit this vulnerability to: - Read sensitive data from unauthorized buckets. - Write malicious data to unauthorized buckets, potentially leading to further exploitation or data corruption. - Bypass authentication mechanisms if they are not properly configured or if there are other vulnerabilities in the system.

Detection & Defense

Immediate Mitigations

- Upgrade to SeaweedFS version 4.30 or later. This version includes a validation middleware that rejects any captured path variable containing a `.` or `..` segment, a NUL byte, an embedded slash/backslash in single-segment slots, or an empty captured value.

Detection Strategies

- Monitor for unusual patterns in HTTP requests, especially those containing `..` or encoded equivalents. - Implement SIEM rules to detect and alert on potential path traversal attempts. - Regularly audit access logs for unauthorized bucket accesses.

Long-Term Hardening

- Ensure authentication is enabled and properly configured for all SeaweedFS instances. - Implement additional security measures such as network segmentation and strict access controls. - Regularly update and patch SeaweedFS instances to prevent exploitation of known vulnerabilities.

Key Takeaways

- Path traversal vulnerabilities can have severe impacts, including unauthorized data access and modification. - Disabling authentication does not protect against this vulnerability and can exacerbate its impact. - Regular updates and proper configuration are crucial for preventing exploitation. - Monitoring and detection strategies are essential for identifying potential attacks.

Sources

- GitHub Security Advisories: https://github.com/advisories/GHSA-w62w-66v9-vvgv - CVE-2026-54917: https://nvd.nist.gov/vuln/detail/CVE-2026-54917