Skip to main content
CVE Vulnerability Database

CVE-2024-9415: SuperAGI Path Traversal Vulnerability

CVE-2024-9415 is a path traversal flaw in SuperAGI 0.0.14 that enables attackers to upload arbitrary files to the server, potentially leading to remote code execution. This post covers technical details, affected versions, impact, and mitigation steps.

Published:

CVE-2024-9415 Overview

CVE-2024-9415 is a path traversal vulnerability [CWE-22] in the file upload functionality of transformeroptimus/superagi version 0.0.14. SuperAGI is an open-source autonomous AI agent framework. The flaw allows an authenticated attacker to submit a crafted filename containing directory traversal sequences during file upload. The server writes the file to attacker-controlled locations outside the intended upload directory. Successful exploitation can lead to arbitrary file write, overwriting of sensitive server files, and potential remote code execution.

Critical Impact

Authenticated attackers can write arbitrary files to any location writable by the SuperAGI process, enabling code execution and full application compromise.

Affected Products

  • SuperAGI (transformeroptimus/superagi) version 0.0.14
  • Deployments exposing the file upload endpoint to authenticated users
  • Self-hosted SuperAGI instances built from the affected release

Discovery Timeline

  • 2025-03-20 - CVE-2024-9415 published to the National Vulnerability Database (NVD)
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-9415

Vulnerability Analysis

The vulnerability stems from insufficient sanitization of user-supplied filenames in SuperAGI's file upload handler. The application accepts a filename parameter and concatenates it with a target directory path without normalizing traversal sequences such as ../. Attackers can escape the intended upload directory and write files to arbitrary locations on the host filesystem.

Exploitation requires low-privilege authenticated access and no user interaction. The impact spans confidentiality, integrity, and availability because attackers can overwrite configuration files, application source code, or scheduled task definitions. Writing to Python module paths or startup scripts can convert the primitive into remote code execution under the SuperAGI service account.

Additional technical details are documented in the Huntr Bug Bounty Report.

Root Cause

The upload handler in SuperAGI 0.0.14 fails to canonicalize or validate the target file path before writing. Absent checks include rejecting .. segments, verifying the resolved path stays within an allowlisted base directory, and normalizing separators. This omission maps directly to CWE-22: Improper Limitation of a Pathname to a Restricted Directory.

Attack Vector

An authenticated attacker sends a file upload request containing a filename such as ../../../../etc/cron.d/backdoor or a path targeting an application module. The server writes the payload to the resolved location. Attackers can then trigger execution by waiting for a scheduled task, overwriting an imported Python file, or replacing a template rendered by the application.

No verified public exploit code is available. See the referenced Huntr report for the disclosed proof-of-concept methodology.

Detection Methods for CVE-2024-9415

Indicators of Compromise

  • Files present under application directories with timestamps that do not match deployment or update events.
  • Uploaded files whose names contain .., URL-encoded traversal sequences (%2e%2e%2f), or absolute paths in request logs.
  • Unexpected modifications to SuperAGI Python modules, configuration files, or systemd/cron definitions.
  • New or altered files owned by the SuperAGI service account outside its designated storage directory.

Detection Strategies

  • Inspect HTTP access logs for upload requests containing traversal patterns in the filename or path parameters.
  • Enable filesystem integrity monitoring on the SuperAGI installation directory and adjacent system paths.
  • Deploy a web application firewall (WAF) rule that blocks or alerts on path traversal sequences in multipart form filenames.
  • Correlate authenticated upload events with subsequent process executions spawned by the SuperAGI runtime.

Monitoring Recommendations

  • Forward SuperAGI application logs and reverse proxy logs to a centralized SIEM for retention and query.
  • Alert on any write operation to system directories originating from the SuperAGI process.
  • Track authenticated API session activity for anomalous upload volume or filename entropy.

How to Mitigate CVE-2024-9415

Immediate Actions Required

  • Upgrade SuperAGI to a release later than 0.0.14 that addresses the path traversal flaw.
  • Restrict network exposure of SuperAGI to trusted users and place the service behind authenticated reverse proxies.
  • Audit the upload directory and application filesystem for unauthorized or modified files since deployment.
  • Rotate credentials, API tokens, and secrets accessible to the SuperAGI process if compromise is suspected.

Patch Information

No vendor advisory URL is listed in the NVD entry. Consult the Huntr Bug Bounty Report and the upstream transformeroptimus/superagi repository for the latest fixed release and remediation guidance. Deploy the upgraded version to all production and staging environments.

Workarounds

  • Run SuperAGI as an unprivileged user in a container with a read-only filesystem outside the designated upload volume.
  • Enforce a WAF rule that rejects uploads whose filename fields contain .., /, or URL-encoded traversal characters.
  • Mount the upload directory with noexec to reduce the impact of arbitrary file writes.
  • Apply mandatory access controls (AppArmor or SELinux) to confine SuperAGI write access to a single directory.
bash
# Example AppArmor snippet restricting SuperAGI write scope
/opt/superagi/uploads/** rw,
deny /etc/** w,
deny /opt/superagi/**.py w,
deny /var/spool/cron/** w,

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.