CVE-2024-2221 Overview
CVE-2024-2221 is a critical path traversal and arbitrary file upload vulnerability affecting Qdrant, a popular open-source vector database used for AI and machine learning applications. The vulnerability exists in the /collections/{COLLECTION}/snapshots/upload endpoint, specifically through the snapshot parameter. This flaw allows attackers to upload and overwrite any file on the filesystem, potentially leading to remote code execution and complete system compromise.
Critical Impact
This vulnerability enables unauthenticated remote attackers to upload malicious files to arbitrary locations on the server, potentially achieving remote code execution and full system takeover.
Affected Products
- Qdrant version 1.7.4
- Qdrant vector database instances with exposed snapshot upload endpoints
- Systems running vulnerable Qdrant deployments accessible over the network
Discovery Timeline
- 2024-04-10 - CVE-2024-2221 published to NVD
- 2025-07-14 - Last updated in NVD database
Technical Details for CVE-2024-2221
Vulnerability Analysis
This vulnerability combines two dangerous weakness classes: Path Traversal (CWE-22) and Unrestricted File Upload (CWE-434). The Qdrant snapshot upload functionality fails to properly sanitize user-supplied input in the snapshot parameter, allowing attackers to use directory traversal sequences (such as ../) to escape the intended upload directory. Combined with the ability to upload arbitrary file content, this creates a critical attack surface.
The vulnerability affects the integrity and availability of systems running Qdrant, as attackers can overwrite critical system files, configuration files, or inject malicious executables. Since Qdrant is commonly used in AI/ML pipelines and may have elevated privileges, successful exploitation could cascade into broader infrastructure compromise.
Root Cause
The root cause lies in insufficient input validation within the snapshot upload handler. The application fails to properly sanitize the snapshot parameter for path traversal characters before using it to construct the destination file path. This allows attackers to craft malicious requests that escape the intended snapshot storage directory and write files to arbitrary locations on the filesystem.
Attack Vector
The attack is executed remotely over the network without requiring authentication or user interaction. An attacker can craft a malicious HTTP request to the /collections/{COLLECTION}/snapshots/upload endpoint with a manipulated snapshot parameter containing path traversal sequences.
The attack flow involves:
- Identifying an exposed Qdrant instance with the vulnerable endpoint accessible
- Crafting a multipart HTTP request with a snapshot parameter containing path traversal sequences (e.g., ../../../etc/cron.d/malicious)
- Including malicious file content in the request body that will be written to the target location
- Sending the request to overwrite system files or plant executable content for code execution
Attackers may target files such as cron jobs, SSH authorized keys, web server configurations, or application binaries to achieve persistent access or immediate code execution.
Detection Methods for CVE-2024-2221
Indicators of Compromise
- Unexpected HTTP POST requests to /collections/*/snapshots/upload endpoints containing ../ sequences in parameters
- Anomalous file creation or modification in system directories by the Qdrant process
- New or modified files in sensitive locations such as /etc/cron.d/, ~/.ssh/, or web server directories
- Qdrant process spawning unexpected child processes or network connections
Detection Strategies
- Implement web application firewall (WAF) rules to block requests containing path traversal patterns in the snapshot parameter
- Monitor Qdrant access logs for requests to the snapshots upload endpoint with suspicious parameter values
- Deploy file integrity monitoring on critical system directories to detect unauthorized modifications
- Use behavioral analysis to detect the Qdrant process writing files outside its expected data directories
Monitoring Recommendations
- Enable verbose logging for the Qdrant snapshot upload functionality
- Configure alerts for any file system write operations by Qdrant outside designated snapshot directories
- Monitor network traffic for large or frequent uploads to snapshot endpoints from untrusted sources
- Implement egress monitoring to detect potential post-exploitation command and control communications
How to Mitigate CVE-2024-2221
Immediate Actions Required
- Update Qdrant to the patched version immediately
- Restrict network access to Qdrant instances using firewall rules to limit exposure to trusted networks only
- Implement authentication and authorization controls in front of Qdrant endpoints if not already present
- Review file system integrity on affected systems to identify any unauthorized modifications
Patch Information
Qdrant has addressed this vulnerability through a security patch commit. Organizations should update to the latest version of Qdrant that includes this fix. The patch implements proper input validation and sanitization for the snapshot parameter to prevent path traversal attacks.
Additional technical details about the vulnerability can be found in the Huntr bounty report.
Workarounds
- Deploy a reverse proxy or WAF in front of Qdrant to filter requests containing path traversal sequences
- Restrict the snapshot upload endpoint to internal networks only using network segmentation
- Run Qdrant with minimal filesystem permissions to limit the impact of file write operations
- Consider containerizing Qdrant with read-only filesystem mounts for non-essential directories
If patching is not immediately possible, network isolation and WAF deployment provide the strongest interim protection against exploitation of this vulnerability.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

