
Proof-of-concept exploit for CVE-2025-9074 demonstrating container-to-host file write via exposed Docker Engine API on Windows. For authorized testing and education only.
Author: w01f
Status: Proof-of-Concept (educational / authorized testing only)
This project demonstrates a PoC for CVE-2025-9074, a misconfiguration/exposure in certain versions of Docker Desktop for Windows where the Docker Engine HTTP API at http://192.168.65.7:2375 is reachable from containers (and sometimes via SSRF), allowing an attacker to create a container with a bind mount to the Windows host drive and write files to the host.
⚠️ Use only in a controlled lab or with explicit written permission. Misuse may violate laws and policies.
http://192.168.65.7:2375)C:\ (as /mnt/host/c inside the Linux VM) to /host_root inside the containerC:\pwn.txt on the hostIf the target is vulnerable, you’ll see the file appear on the Windows host.
192.168.65.7:2375 (HTTP, no TLS).✅ If
GET http://192.168.65.7:2375/_pingreturnsOKfrom inside a container, the PoC conditions likely exist.
.
├─ cve_2025_9074_poc.py # Python PoC (requests-based)
└─ README.md # This file
pip install requestshttp://192.168.65.7:2375) from the container where you run the PoC# 1) Install dependency
pip install --no-input requests
# 2) Run the PoC
python3 cve_2025_9074_poc.py
# Optional: customize output filename or image
# python3 cve_2025_9074_poc.py --outfile test.txt --image busybox
Default behavior:
http://192.168.65.7:2375/mnt/host/c (Windows C:\ as seen from the Linux VM)/host_rootC:\pwn.txt--host Engine host IP (default: 192.168.65.7)
--port Engine port (default: 2375)
--image Container image (default: alpine)
--host-path Path on engine host/VM to bind (default: /mnt/host/c)
--mount-path Path inside the container (default: /host_root)
--outfile Filename to create on host C:\ (default: pwn.txt)
On a vulnerable system, after running the PoC you should find:
C:\pwn.txt
containing the text pwned_by_CVE_2025_9074.
The PoC uses a short-lived container. If you want to be thorough:
# From a privileged shell with docker CLI access:
docker ps -a --format '{{.ID}}\t{{.Image}}\t{{.Command}}'
# Remove by container ID if any remain:
docker rm -f <CONTAINER_ID>
# Remove the test file on the host:
del C:\pwn.txt
HostConfig.Binds includes paths like /mnt/host/c or other host drive mounts.C:\ from processes attributable to the Docker Linux VM context.192.168.65.7:2375 (HTTP) is suspicious./ping not OK / connection refused: The engine API isn’t reachable from your container; the host may be patched or not exposed.--host-path correctly maps to the Windows C:\ from the Linux VM. Some environments differ.alpine or switch to busybox with --image busybox.This PoC is provided for educational and authorized testing only. Running against systems without explicit written authorization is illegal and unethical. The author and contributors are not responsible for misuse or damages.
MIT
Author: w01f