CVE-2026-6615: TransformerOptimus SuperAGI Path Traversal
Executive Summary
Section titled “Executive Summary”SuperAGI is an open-source framework designed for developing and deploying autonomous AI agents. As organizations increasingly deploy agentic AI frameworks connected to internal networks, vulnerabilities within these tools present a massive attack surface.
CVE-2026-6615 (CVSS 7.3 - 7.5 High) exposes a fundamental flaw in the framework’s resource management component. The vulnerability resides in the Multipart Upload Handler, specifically within superagi/controllers/resources.py. Due to an utter lack of input sanitization on the file Name argument, an attacker can utilize directory traversal sequences (../) to escape the intended upload directory. This allows the attacker to write arbitrary files anywhere on the host filesystem, paving the way for immediate RCE (e.g., by overwriting SSH keys or cron jobs).
Technical Vulnerability Analysis
Section titled “Technical Vulnerability Analysis”The vulnerability is rooted in CWE-22 (Improper Limitation of a Pathname to a Restricted Directory).
When a user or agent uploads a file to the SuperAGI Resource Manager, the HTTP POST request is routed to the /api/resources/add/<id> endpoint. The backend Python code in superagi/controllers/resources.py extracts the filename from the multipart form data and uses it directly in file system operations without passing it through a secure sanitization function (like werkzeug.utils.secure_filename or os.path.basename).
By intercepting the HTTP request and modifying the filename parameter to include traversal payloads (e.g., ../../../../../etc/cron.d/malicious), the attacker forces the Python application to resolve the path relative to the root directory, resulting in an arbitrary file write with the privileges of the SuperAGI process.
Exploitation Flow to RCE
Section titled “Exploitation Flow to RCE”The attack complexity is low, and an exploit can be achieved using standard web proxies (like Burp Suite).
- Target Identification: The attacker accesses the SuperAGI Resource Manager web interface or interacts directly with the API.
- Payload Crafting: The attacker generates an SSH Public Key (to be used as the payload content).
- Interception: The attacker uploads a standard
.txtfile but intercepts thePOSTrequest to/api/resources/add/<id>. - Path Manipulation: The attacker modifies the
filenameparameter in the multipart body to:../../../../../../../../../../../home/<user>/.ssh/authorized_keys. - Arbitrary File Write: The SuperAGI server processes the request and writes the attacker’s SSH key into the victim’s
authorized_keysfile. - Remote Code Execution: The attacker connects to the server via SSH without a password, gaining full shell access to the host machine.
Forensic Investigation (CSIRT)
Section titled “Forensic Investigation (CSIRT)”Since this attack leverages the Python process to write files, DFIR analysts should focus on unexpected file creations and suspicious web requests.
- File System Anomalies: Search for recent modifications to highly sensitive configuration files (
~/.ssh/authorized_keys,/etc/passwd,/etc/cron.d/*) where the owner or creator is the service account running SuperAGI. - Web/API Logs: Audit reverse proxy logs (Nginx/Traefik) or SuperAGI application logs for
POSTrequests to/api/resources/add/*containing URL-encoded traversal characters (e.g.,%2E%2E%2F).
Detection & Threat Hunting
Section titled “Detection & Threat Hunting”Deploy the following detection logic to identify exploitation attempts against the SuperAGI resource manager.
title: SuperAGI Arbitrary File Write (CVE-2026-6615)id: e4b5c6d7-8f9a-0b1c-2d3e-4f5a6b7c8d9estatus: experimentaldescription: Detects the SuperAGI python process writing files to sensitive system directories (e.g., .ssh), indicating a successful path traversal exploitation.logsource: category: file_event product: linuxdetection: selection: Image|endswith: - '/python' - '/python3' TargetFilename|contains|any: - '/.ssh/authorized_keys' - '/etc/cron.d/' - '/etc/passwd' - '/etc/shadow' condition: selectionlevel: hightags: - attack.initial_access - attack.t1190 - cve.2026-6615# Hunt for path traversal payloads targeting the SuperAGI resource upload endpointindex=web_logs http_method=POST uri_path="/api/resources/add/*"| search request_body="*..%2F*" OR request_body="*../*" OR request_body="*..\\*"| table _time, src_ip, uri_path, request_body, status| sort - _timeMitigation and Defense
Section titled “Mitigation and Defense”As the vendor has not released an official patch for versions up to 0.0.14 at the time of disclosure, organizations must implement compensating controls immediately:
- WAF Filtering: Deploy strict Web Application Firewall (WAF) rules to block incoming HTTP requests containing
../or%2E%2E%2Fin multipart form boundaries. - Container Isolation: Ensure SuperAGI is deployed within a heavily restricted Docker container. Mount the host file system as Read-Only wherever possible, and restrict the container’s user privileges to prevent writes to
/root/or/etc/. - Code Patching (Manual): Manually edit
superagi/controllers/resources.pyto enforcewerkzeug.utils.secure_filename()on theNameargument before saving the file to disk.
Sources & References
Section titled “Sources & References”- Akaoma Vulnerability Analysis: CVE-2026-6615 Exploit Details
- Shimi’s Cyber World: Path Traversal in SuperAGI Exploitable Remotely
- Huntr Bug Bounty: Path Traversal leads to RCE in transformeroptimus/superagi
- Related Analysis: AI Agent Security & Defense-in-Depth