CVE-2023-5165

7.1 HIGH

📋 TL;DR

CVE-2023-5165 allows unprivileged users to bypass Enhanced Container Isolation (ECI) restrictions in Docker Desktop by accessing a debug shell during a short time window after launch. This affects Docker Business customers running vulnerable versions where users lack local root/administrator privileges. The vulnerability enables privilege escalation within container environments.

💻 Affected Systems

Products:
  • Docker Desktop
Versions: from 4.13.0 before 4.23.0
Operating Systems: Windows, macOS, Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Docker Business customers using Enhanced Container Isolation feature; requires local user access without root/administrator privileges.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Unprivileged user gains full container escape, executes arbitrary code on host system, and compromises the Docker host environment.

🟠

Likely Case

User bypasses container isolation policies, accesses restricted resources, and potentially escalates privileges within containerized workloads.

🟢

If Mitigated

Limited impact due to short exploitation window and requirement for local access; proper user privilege management reduces risk.

🌐 Internet-Facing: LOW - Requires local access to Docker Desktop instance; not directly exploitable over network.
🏢 Internal Only: MEDIUM - Internal users with Docker Desktop access could exploit during specific time windows to bypass container isolation.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires local access and timing to catch debug shell window; specific to Docker Business ECI configurations.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.23.0

Vendor Advisory: https://docs.docker.com/desktop/release-notes/#4230

Restart Required: Yes

Instructions:

1. Open Docker Desktop. 2. Navigate to Settings > Software Updates. 3. Check for updates and install version 4.23.0 or later. 4. Restart Docker Desktop after installation completes.

🔧 Temporary Workarounds

Disable Docker Desktop Auto-start

all

Prevent automatic launch of Docker Desktop to reduce exposure window

# On macOS/Linux: disable Docker Desktop launch agent
launchctl unload ~/Library/LaunchAgents/com.docker.docker.plist
# On Windows: disable Docker Desktop startup via Task Manager or Services

Restrict User Privileges

all

Ensure users don't have Docker Desktop launch permissions

# Example Linux: restrict Docker group membership
sudo usermod -aG docker trusted_users_only
# Remove unauthorized users from docker group

🧯 If You Can't Patch

  • Implement strict access controls to limit who can launch Docker Desktop
  • Monitor for unauthorized debug shell access attempts and container escape activities

🔍 How to Verify

Check if Vulnerable:

Check Docker Desktop version: if between 4.13.0 and 4.22.x inclusive, system is vulnerable

Check Version:

# Docker Desktop version check
docker version --format '{{.Client.Version}}'

Verify Fix Applied:

Confirm Docker Desktop version is 4.23.0 or higher and Enhanced Container Isolation functions properly

📡 Detection & Monitoring

Log Indicators:

  • Unexpected debug shell access logs
  • Container escape attempts
  • Unauthorized privilege escalation within containers

Network Indicators:

  • Unusual container-to-host network traffic patterns

SIEM Query:

source="docker" AND (event="debug_shell_access" OR event="container_escape_attempt")

🔗 References

📤 Share & Export