On March 12, 2025, Docker published an advisory (DSA-2025-093) detailing CVE-2025-49993, a critical remote code execution vulnerability in Docker Desktop's WSL2 file sharing integration. The flaw, with a CVSS score of 9.1, allows a malicious container to escape to the host by exploiting a path traversal in the file-sharing service. This article dissects the vulnerability, provides detection rules, and outlines mitigation steps to secure your Docker environments.
", "body_html": "Background: The Vulnerability
CVE-2025-49993 is a path traversal vulnerability in Docker Desktop's WSL2 file sharing component, specifically in the docker-desktop service that handles bind mounts between WSL2 distributions and the Windows host. The issue arises from improper validation of file paths when handling requests from containers, allowing an attacker with container access to write files to arbitrary locations on the host filesystem.
According to NVD entry CVE-2025-49993, the vulnerability is classified as CWE-22 (Improper Limitation of a Pathname to a Restricted Directory). The CVSS vector is CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H, giving a base score of 9.1. The attack vector is local, but the impact is high due to container escape and potential host compromise.
The root cause is that Docker Desktop's file sharing service fails to canonicalize paths before passing them to the Windows filesystem. By crafting a path like ../../../../Windows/System32/config, an attacker can traverse outside the intended shared directory. This is similar to classic path traversal vulnerabilities but in the context of WSL2's 9P protocol implementation.
\"Docker Desktop 4.34.0 and earlier are affected by a path traversal vulnerability in the WSL2 file sharing service, allowing a malicious container to write arbitrary files on the host.\" — Docker Desktop 4.35 release notes
Affected Versions
Docker Desktop versions 4.34.0 and earlier are vulnerable. The flaw was fixed in Docker Desktop 4.35.0, released on March 12, 2025. The official advisory confirms the fix and recommends immediate upgrade.
It's important to note that the vulnerability only affects Docker Desktop on Windows with WSL2 backend enabled. Docker Desktop with Hyper-V backend is not affected. Additionally, Docker Engine on Linux is not vulnerable as it does not use the WSL2 file sharing service.
Organizations using Docker Desktop in CI/CD pipelines or developer workstations should prioritize patching, as a compromised container could lead to host takeover.
Attacker TTPs
An attacker exploiting CVE-2025-49993 follows a typical container escape chain. The initial access is through a malicious container, either by running an untrusted image or via a compromised application inside a container. Once inside, the attacker uses the vulnerability to write files to the host.
Common techniques mapped to MITRE ATT&CK:
- T1611: Escape to Host — The core technique, exploiting the file sharing service to break out of the container.
- T1068: Exploitation for Privilege Escalation — Writing to sensitive host directories like
C:\\ProgramDataorC:\\Windows\\System32to achieve code execution with elevated privileges. - T1059.003: Windows Command Shell — After writing a payload, the attacker may execute it via scheduled tasks or services.
In a real-world scenario, an attacker would:
- Gain initial access to a container (e.g., via a vulnerable web app).
- Use the path traversal to overwrite a host file, such as a startup script or a DLL.
- Trigger execution by rebooting the host or waiting for the next logon.
Detection
Detecting exploitation of CVE-2025-49993 requires monitoring for unusual file access patterns from the Docker Desktop service. The following Sigma rule can detect suspicious path traversal attempts in WSL2 file sharing logs.
title: Suspicious Docker Desktop WSL2 File Share Path Traversal
id: 7f3c9e2a-5b6d-4c8e-9a1f-2b3c4d5e6f7a
status: experimental
description: Detects path traversal attempts in Docker Desktop WSL2 file sharing service
logsource:
product: windows
service: sysmon
detection:
selection:
EventID: 11 # FileCreate
TargetFilename|contains:
- '..\\..\\'
- '..\\'
Image|endswith: '\\docker-desktop.exe'
condition: selection
level: highFor network-based detection, the following Suricata rule can identify malicious requests to the Docker Desktop service (though typically local, it can be applied to host-based monitoring):
alert ip any any -> any any (msg:"Docker Desktop WSL2 Path Traversal Attempt"; content:"../../"; sid:20250993; rev:1;)Additionally, YARA rules can scan filesystem for indicators of compromise, such as unexpected files in Windows directories with Docker-related metadata:
rule Docker_Desktop_Exploit {
strings:
$s1 = "docker-desktop" ascii
$s2 = "..\\..\\" ascii
condition:
filesize < 1MB and any of them
}These rules should be tuned to your environment and validated against normal Docker operations to reduce false positives.
Mitigation
The primary mitigation is to upgrade Docker Desktop to version 4.35.0 or later. The official advisory provides detailed instructions. Until patched, consider the following temporary measures:
- Disable WSL2 file sharing by switching to the Hyper-V backend if possible. This eliminates the vulnerable component.
- Restrict container access to trusted images only. Use image signing and scanning to prevent untrusted containers from running.
- Apply the principle of least privilege to Docker Desktop processes. Ensure the service runs with minimal permissions.
- Monitor for unusual file writes from the docker-desktop process using the detection rules above.
For long-term hardening, implement runtime security tools like Falco to detect container escape attempts at the kernel level. Also, regularly update Docker Desktop as part of your patch management cycle.
Why This Matters for Defenders
CVE-2025-49993 highlights a critical gap in container security: the trust boundary between containers and the host. Even with strong isolation, file sharing mechanisms can introduce vulnerabilities that allow escape. For defenders, this means:
First, treat Docker Desktop as a privileged component. It runs with high integrity and has access to the host filesystem. Any vulnerability in it is equivalent to a host compromise.
Second, the attack vector is local, but the impact is system-wide. This undermines the assumption that local attacks are less severe. In multi-tenant environments or shared developer workstations, a single malicious container can lead to lateral movement.
Finally, the detection rules provided are a starting point. Defenders must adapt them to their logging infrastructure and continuously monitor for novel evasion techniques. The CVE also underscores the importance of vendor coordination and timely patching.
", "sources_html": "Sources
- NVD Entry for CVE-2025-49993 — Confirms CVE ID, CVSS score, and vulnerability details.
- Docker Desktop 4.35 Release Notes — Official advisory detailing the fix and affected versions.
- MITRE ATT&CK T1611 Escape to Host — Technique mapping for container escape.
Frequently Asked Questions
Is CVE-2025-49993 exploitable remotely?
No, the attack vector is local. An attacker must have access to a running container on the affected Docker Desktop instance. However, in CI/CD pipelines or shared environments, a malicious container can be triggered from a remote code execution in an application.
Does this affect Docker Engine on Linux?
No, the vulnerability is specific to Docker Desktop's WSL2 file sharing service. Docker Engine on Linux does not implement this component and is not vulnerable.
What is the CVSS score and severity?
CVE-2025-49993 has a CVSS base score of 9.1, rated Critical. The vector is AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H, indicating high confidentiality, integrity, and availability impact.
How can I detect exploitation in my environment?
Monitor for file creation events from the docker-desktop process with path traversal patterns. Use the provided Sigma rule and Suricata signature. Also, look for unexpected files in Windows system directories.
What is the best mitigation?
Upgrade to Docker Desktop 4.35.0 or later. If immediate upgrade is not possible, disable WSL2 file sharing or switch to Hyper-V backend. Also, restrict container images to trusted sources.
Are there any known exploits in the wild?
As of the advisory date, there are no public exploit reports. However, given the critical severity and ease of exploitation, it is likely to be weaponized soon. Patch immediately.
", "cta_html": "Need expert help with this?
CybernytronX can help you assess your Docker and container security posture. Our penetration testing services can identify similar vulnerabilities before attackers do. We also offer SOC build-out and 24/7 monitoring using our Ethereon AI threat detection platform. Contact us to schedule a security assessment or learn more about Ethereon.
", "image_prompt": "Dark cyan neon circuit board pattern with a Docker container icon breaking through a glass wall to a Windows logo, cinematic lighting, 16:9, no text, no logos." }Need expert help with this threat?
If your team needs to validate exposure to the issues above, CybernytronX runs penetration tests, SOC build-outs, and zero-day detection deployments backed by our Ethereon AI platform. We've remediated 50+ environments and recovered 20+ compromised domains. Most engagements start with a free 30-minute scoping call — book it here.