Skip to content
Path traversal Disclosed report Intermediate CVE-2024-11042

InvokeAI Arbitrary File Deletion vulnerability

The web API endpoint for deleting images does not properly validate file paths, allowing an unauthenticated attacker to delete arbitrary files on the server. This could lead to deletion of critical system files such as SSH keys, databases, and configuration files, impacting integrity and availability.

invoke-ai/invokeai

Originally disclosed on huntr

Critical View original

In invoke-ai/invokeai version v5.0.2, the web API POST /api/v1/images/delete is vulnerable to Arbitrary File Deletion. This vulnerability allows unauthorized attackers to delete arbitrary files on the server, potentially including critical or sensitive system files such as SSH keys, SQLite databases, and configuration files. This can impact the integrity and availability of applications relying on these files.

From the GitHub Advisory Database (GHSA-227r-w5j2-6243, CC BY 4.0).

The original report as published on the GitHub Advisory Database. Images and videos are our own copies; raw HTML is shown as text. View it on GitHub Advisory Database.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the endpoint accepts a file path without validating that it points to an image within an allowed directory, allowing path traversal or arbitrary file deletion.

Impact

An unauthenticated attacker could delete arbitrary files, potentially including critical system files, affecting integrity and availability.

What the attacker needed

No authentication required

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A web server has a feature to delete images, but it does not check that the file being deleted is actually an image. An attacker can trick it into deleting any file on the server, like important keys or databases, which can break the system or lock people out.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More from invoke-ai/invokeai

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.