qdrant is vulnerable to path traversal due to improper input validation in the `/collections/{name}/snapshots/upload` endpoint
The snapshot upload endpoint failed to validate the collection name, allowing URL-encoded path traversal sequences to write files outside the intended directory. An attacker could write or overwrite arbitrary files on the server, potentially leading to full system takeover.
qdrant/qdrant
Originally disclosed on huntr
qdrant/qdrant version 1.9.0-dev is vulnerable to path traversal due to improper input validation in the /collections/{name}/snapshots/upload endpoint. By manipulating the name parameter through URL encoding, an attacker can upload a file to an arbitrary location on the system, such as /root/poc.txt. This vulnerability allows for the writing and overwriting of arbitrary files on the server, potentially leading to a full takeover of the system. The issue is fixed in version 1.9.0.
From the GitHub Advisory Database (GHSA-xcr2-h8hv-6227, 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 collection name from the URL path was used directly to build a filesystem path without sanitising path traversal sequences.
Impact
An attacker could write and overwrite arbitrary files on the server, potentially leading to a full takeover of the system.
What the attacker needed
Access to the snapshot upload endpoint
The fix
The issue was fixed in version 1.9.0.
How it was found
- Send a request to the snapshot upload endpoint with a crafted collection name containing URL-encoded traversal sequences.
- The server writes the uploaded file to an arbitrary location such as /root/poc.txt.
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 that saves uploaded files into a folder. The part of the web address that names the collection was not checked, so someone could use special characters to make the server save the file somewhere else entirely, like a system folder. That means an attacker could replace important files and possibly take control of the machine.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.