CVE-2025-64485
Executive Summary
CVE-2025-64485 is a vulnerability in CVAT (Computer Vision Annotation Tool), an open-source interactive video and image annotation tool. A malicious user with at least the "User" global role can create or overwrite files in the root of the mounted file share. If no file share is mounted, the user can create files in the share directory of the import worker container, potentially leading to disk space exhaustion. This vulnerability affects versions 2.4.0 through 2.48.1 and is fixed in version 2.49.0. The CVSS score is 0.0, indicating a lack of official scoring, but the impact is considered moderate due to the potential for denial of service and file manipulation.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
CVAT is a Python/Django-based application distributed via Docker images and GitHub. The vulnerability exists in the application logic, not in a specific package dependency. However, organizations using CVAT should verify the integrity of their deployment and ensure they are running version 2.49.0 or later. The fix is included in the official Docker images and source code.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (Not officially assigned)
- Attack Vector (AV): Network (likely)
- Attack Complexity (AC): Low (likely)
- Privileges Required (PR): Low (User role)
- User Interaction (UI): None
- Scope (S): Unchanged
- Confidentiality (C): None
- Integrity (I): Low (file creation/overwrite)
- Availability (A): Low (disk space exhaustion)
Threat Level: Medium. The vulnerability requires authentication but allows a low-privileged user to impact file system integrity and availability.
Deep Dive & Mechanics
The vulnerability lies in the file handling logic of CVAT's import worker. When a user imports data, the application writes files to a shared file system. Due to insufficient path validation, a malicious user can specify a path that escapes the intended import directory, allowing them to write files to arbitrary locations within the mounted share or the container's filesystem.
Root Cause: Lack of proper sanitization of user-supplied file paths during the import process. The application does not check for path traversal sequences (e.g., ../) or enforce that files are written only to a designated subdirectory.
Attack Scenario:
- An attacker with a valid CVAT account (User role or higher) initiates an import task.
- The attacker crafts a malicious payload that includes a file with a path like
../../etc/cron.d/maliciousor../../../root/.ssh/authorized_keys. - The import worker processes the payload and writes the file to the specified path.
- If a file share is mounted, the file is written to the share root. If not, it is written to the container's share directory.
- The attacker can overwrite critical files or fill the disk, causing a denial of service.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
# Vulnerable: No path validation
def handle_import(file_path, content):
with open(file_path, 'w') as f:
f.write(content)
Patched Code (Conceptual):
import os
# Patched: Validate and restrict path
ALLOWED_DIR = "/mnt/share/imports"
def handle_import(file_path, content):
# Resolve the absolute path
abs_path = os.path.abspath(file_path)
# Ensure it starts with the allowed directory
if not abs_path.startswith(ALLOWED_DIR):
raise PermissionError("Invalid file path")
with open(abs_path, 'w') as f:
f.write(content)
Exploitation & Lab Setup
Red Team
Prerequisites:
- A running CVAT instance (version 2.4.0 to 2.48.1)
- A valid user account with at least the "User" role
- Access to the CVAT API or web interface
Exploitation Steps:
- Log in to CVAT.
- Create a new task or import data.
- Craft a malicious import payload (e.g., a ZIP file containing a file with a path traversal name).
- Submit the import request.
- Monitor the file system to confirm file creation.
Example Payload (ZIP file):
import zipfile
import io
# Create a malicious ZIP file
zip_buffer = io.BytesIO()
with zipfile.ZipFile(zip_buffer, 'w') as zf:
# Path traversal to write to /tmp/evil.txt
zf.writestr('../../tmp/evil.txt', 'malicious content')
with open('malicious.zip', 'wb') as f:
f.write(zip_buffer.getvalue())
Blue Team
Detection:
- Monitor file system for unexpected file creations in sensitive directories.
- Enable audit logging on the file share.
- Use file integrity monitoring (FIM) tools.
Prevention:
- Apply the patch by upgrading to CVAT 2.49.0.
- Implement strict input validation for file paths.
- Use container security features (e.g., read-only root filesystem, seccomp profiles).
Indicators of Compromise (IOCs)
- File Paths: Unexpected files in
/mnt/share/,/tmp/,/etc/,/root/ - Log Entries: Import worker logs showing unusual file paths (e.g.,
../../) - Network: Unusual API calls to import endpoints with large payloads
- Disk Usage: Sudden increase in disk usage on the import worker container
Detection Engineering
YARA Rule
rule CVE_2025_64485_CVAT_FileWrite {
meta:
description = "Detects attempts to exploit CVE-2025-64485 in CVAT"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-64485"
strings:
$path_traversal = /\.\.\/|\.\.\\/
$cvat_import = /import|upload|task/i
condition:
$path_traversal and $cvat_import
}
Sigma Rule
title: CVE-2025-64485 CVAT File Write Exploitation
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects file write operations with path traversal in CVAT import worker logs
author: Valters IT
date: 2025-04-10
logsource:
category: file_event
product: linux
detection:
selection:
Image|endswith: '/cvat_import_worker'
TargetFilename|contains: '..'
condition: selection
falsepositives:
- Legitimate use of relative paths (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-64485 CVAT File Write Exploitation"; flow:to_server,established; content:"POST"; http_method; content:"/api/v1/tasks/"; http_uri; content:"import"; http_uri; pcre:"/\.\.\//Ri"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate:
- Upgrade CVAT to version 2.49.0 or later.
- If upgrade is not possible, restrict access to the import functionality to trusted users only.
- Implement network segmentation to limit access to the CVAT API.
Long-term:
- Conduct a security audit of file handling logic in the application.
- Implement input validation and path sanitization for all user-supplied file paths.
- Use container security best practices (e.g., read-only root filesystem, minimal privileges).
- Enable audit logging and monitoring for file system events.
Workaround:
- Mount the file share with read-only permissions for the import worker container (if possible).
- Use a separate, restricted user account for import operations.
Valters IT
DevSecOps & Cyber Threat Intelligence