Severity:

HIGH RISK

(7.3)

Path Traversal in SuperAGI Multipart Upload Handler

CVE-2026-6615

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write / Filesystem Access

Severity:

HIGH RISK

(7.3)

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

TransformerOptimus SuperAGI up to version 0.0.14 contains a path traversal vulnerability in the Upload function of superagi/controllers/resources.py, where the Name parameter from multipart uploads is not safely constrained.

An attacker can remotely craft upload requests that traverse directories on the server's filesystem, potentially writing files outside the intended upload area and impacting application or system integrity.

Affected context

The vulnerability occurs in deployments of TransformerOptimus SuperAGI (up to 0.0.14) that expose the multipart upload functionality implemented in superagi/controllers/resources.py.

It is relevant when user-controlled upload parameters (specifically the Name argument) are used to construct filesystem paths without strict validation or normalization.

Any environment where the application has write access to the underlying filesystem and accepts remote uploads may be affected.

Exploit preconditions

  • Attack surface: HTTP(S) endpoint handling multipart uploads via the Upload function.
  • Required access: Ability to send upload requests to the affected endpoint (typically unauthenticated or low-privilege web access, depending on deployment configuration).
  • Trigger point: Submission of a crafted multipart upload where the Name parameter contains path traversal sequences (e.g., nested directories or parent directory references).
  • Why exploitation is possible: The server-side code trusts the Name parameter when constructing filesystem paths, failing to enforce confinement to a designated upload directory or to reject traversal patterns.

Why this happens

This is a classical CWE-22: Path Traversal issue where user-supplied input is incorporated directly into filesystem paths.

The Upload handler appears to use the Name argument from a multipart request as part of the destination path for saving uploaded content, without robust normalization, canonicalization, and boundary checks.

As a result, attackers can introduce directory traversal tokens or crafted path segments that escape the intended upload directory, allowing file placement in arbitrary locations within the process's accessible filesystem.

Potential impact

  • Write of arbitrary files to locations accessible by the application process
  • Overwriting of existing files used by the application, potentially leading to service disruption or configuration tampering
  • Planting of web-accessible files that may enable follow-on attacks (e.g., serving malicious content)
  • Interference with logs, temporary files, or data used by other components, which can aid in further compromise

General mitigation guidance

Effective mitigation focuses on treating all path components derived from user input as untrusted and constraining them rigorously:

  • Enforce a fixed, server-side controlled base directory for uploads, never accepting client-supplied absolute paths.
  • Normalize and canonicalize the resulting path, then verify it remains within the intended upload root (e.g., via a strict prefix or directory check).
  • Reject path components containing directory traversal sequences, drive letters, or special device names, and restrict Name to a safe subset of characters.
  • Use server-generated filenames or identifiers rather than trusting client-provided names, optionally storing the original name only as metadata.
  • Run the application under least-privilege accounts with minimal filesystem permissions to reduce the blast radius of any file-system misuse.

How teams detect issues like this

Organizations can identify and monitor this class of issue using a combination of code-centric and operational approaches:

  • Static analysis rules that flag instances where request parameters are concatenated into filesystem paths or passed directly to file APIs without validation.
  • Targeted code reviews for upload handlers and resource controllers, focusing on how filenames, paths, and directories are derived from user input.
  • Security tests or dynamic scanners that attempt directory traversal sequences within upload-related parameters and verify that files cannot escape the intended upload directory.
  • Logging and alerting around unexpected file creations or modifications outside known upload directories, using filesystem integrity monitoring where feasible.

Sources

SourceLink
gist.github.comgist.github.com/YLChen-007/300843c707435540ce0e23bff3e6173a
vuldb.comvuldb.com/submit/791083
vuldb.comvuldb.com/vuln/358250
vuldb.comvuldb.com/vuln/358250/cti

Frequently asked

questions

Yes. The issue resides in a multipart upload handler reachable over HTTP(S), and exploitation can typically be performed remotely by sending crafted upload requests to the affected endpoint.

The attacker must be able to reach the upload endpoint and submit multipart file uploads. Whether authentication is required depends on how the SuperAGI instance is configured, but the vulnerability itself does not inherently require elevated privileges.

Use server-controlled filenames and directories, normalize and validate any path derived from user input, and enforce that the final resolved path always remains within a fixed upload directory. Reject or sanitize any input containing traversal indicators or disallowed characters.

Establish a standard pattern for file handling that treats all path elements from clients as untrusted, requires strict validation, and is enforced through code review and automated checks. Combine this with least-privilege filesystem permissions so that even if a flaw is introduced, its impact is limited.

Find out what's already
exploitable in your codebase.