Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-51906 Overview
CVE-2026-51906 is a path traversal vulnerability in TaskingAI v0.3.0. The flaw resides in the save_url_image function used by the DALL-E 3 image generation tool. Attackers can manipulate the project_id parameter to write downloaded images to arbitrary locations on the server filesystem. The issue is tracked under CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). Exploitation requires no authentication and no user interaction, and it is reachable over the network.
Critical Impact
Unauthenticated remote attackers can write attacker-controlled image files to arbitrary filesystem paths, enabling file overwrite and potential code execution through strategic placement of files in sensitive directories.
Affected Products
- TaskingAI v0.3.0
- TaskingAI deployments exposing the DALL-E 3 image generation tool
- Instances using the save_url_image function with user-supplied project_id values
Discovery Timeline
- 2026-10-02 - CVE-2026-51906 published to the National Vulnerability Database
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-51906
Vulnerability Analysis
TaskingAI integrates DALL-E 3 as an image generation tool that downloads generated images to the server using the save_url_image function. The function constructs the output file path by concatenating the user-supplied project_id parameter with a base directory. The parameter is neither validated nor normalized before being used in filesystem operations.
An attacker supplying a project_id value containing directory traversal sequences such as ../ can escape the intended storage directory. The downloaded image is then written to any location writable by the TaskingAI service account. The impact includes overwriting configuration files, planting web shells in served directories, and corrupting application files. The vulnerability is classified under CWE-22.
Root Cause
The root cause is missing input validation on the project_id parameter inside save_url_image. The function trusts caller-supplied path components when building the destination path. There is no canonicalization check confirming the resolved path remains inside the intended image storage directory.
Attack Vector
An unauthenticated attacker sends a crafted request to the DALL-E 3 image generation endpoint with a malicious project_id value. The parameter contains path traversal sequences that redirect the output file to an attacker-chosen location. The attacker also controls the image URL that gets downloaded, allowing the written content to be arbitrary bytes rather than legitimate image data. See the GitHub Gist PoC Code and the GitHub TaskingAI Issue Discussion for proof-of-concept details.
Detection Methods for CVE-2026-51906
Indicators of Compromise
- Requests to TaskingAI image generation endpoints containing ../ or URL-encoded %2e%2e%2f sequences in the project_id parameter.
- New or modified files outside the TaskingAI image storage directory with timestamps correlating to image generation requests.
- Unexpected files in web-served directories, cron paths, or application configuration directories owned by the TaskingAI service account.
- Outbound HTTP requests from the TaskingAI server to attacker-controlled URLs serving non-image content.
Detection Strategies
- Inspect application and reverse-proxy logs for project_id parameter values containing path traversal metacharacters.
- Monitor filesystem write events originating from the TaskingAI process outside its designated storage directory.
- Correlate DALL-E 3 tool invocations with file creation events across the host to surface anomalous write targets.
Monitoring Recommendations
- Enable auditd or equivalent file integrity monitoring on directories adjacent to TaskingAI storage paths.
- Alert on HTTP requests to TaskingAI endpoints where parameters contain .., %2e%2e, or absolute paths.
- Track egress connections from the TaskingAI host to identify suspicious image source URLs supplied by callers.
How to Mitigate CVE-2026-51906
Immediate Actions Required
- Restrict network access to TaskingAI instances to trusted networks until a patched release is deployed.
- Disable the DALL-E 3 image generation tool if it is not required for current workloads.
- Review filesystem changes on the TaskingAI host for unauthorized files written outside the image storage directory.
- Rotate credentials and secrets accessible to the TaskingAI service account if compromise is suspected.
Patch Information
No vendor advisory URL is listed in the NVD record at the time of publication. Monitor the GitHub TaskingAI Issue Discussion for upstream fix guidance and track the TaskingAI repository for a release that validates and canonicalizes the project_id parameter inside save_url_image.
Workarounds
- Apply a reverse-proxy rule rejecting requests where project_id contains .., forward slashes, backslashes, or null bytes.
- Run the TaskingAI process under a dedicated unprivileged user with write access limited to the image storage directory only.
- Mount the image storage directory with filesystem-level restrictions preventing writes outside the intended path, for example using a bind mount with nosuid and strict ownership.
- Add an input validation wrapper that enforces an allowlist pattern such as ^[A-Za-z0-9_-]+$ on project_id before any filesystem operation.
# Configuration example: NGINX rule to block traversal in project_id
location /v1/ {
if ($arg_project_id ~* "(\.\.|%2e%2e|/|\\)") {
return 400;
}
proxy_pass http://taskingai_backend;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

