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
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).
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.