CVE-2020-29591

9.8 CRITICAL

📋 TL;DR

This vulnerability allows remote attackers to gain root access to Docker registry containers by using a blank password for the root user. It affects systems running vulnerable versions of the official Docker registry image. Attackers can potentially compromise the entire container and access or modify stored container images.

💻 Affected Systems

Products:
  • Docker Official Registry Image
Versions: Versions through 2.7.0
Operating Systems: Any OS running Docker containers
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects the official Docker registry image, not the registry software itself when installed via other methods.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the Docker registry container with root access, allowing attackers to steal, modify, or delete all container images, inject malicious images into the supply chain, and pivot to other systems.

🟠

Likely Case

Unauthorized access to the registry leading to image theft or tampering, potentially affecting downstream deployments that pull from the compromised registry.

🟢

If Mitigated

Limited impact if registry is isolated, not internet-facing, and has network controls preventing unauthorized access attempts.

🌐 Internet-Facing: HIGH - Internet-facing registries are directly accessible to attackers who can attempt blank password authentication.
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems could exploit this if they can reach the registry service.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires authentication attempt with blank password, which is trivial to attempt. Public proof-of-concept code exists demonstrating the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version 2.7.1 and later

Vendor Advisory: https://github.com/docker/distribution-library-image

Restart Required: Yes

Instructions:

1. Pull the updated registry image: docker pull registry:2.7.1
2. Stop the vulnerable container
3. Recreate container using the updated image
4. Verify the fix by checking container logs and testing authentication

🔧 Temporary Workarounds

Set root password

linux

Manually set a strong password for the root user inside the container

docker exec -it <container_name> passwd root

Disable root login

linux

Configure the container to disable root SSH/login access

docker exec -it <container_name> usermod -L root

🧯 If You Can't Patch

  • Implement strict network controls to limit access to registry container only from trusted sources
  • Monitor authentication logs for failed login attempts and blank password usage

🔍 How to Verify

Check if Vulnerable:

Check the registry image version: docker images | grep registry
If version is 2.7.0 or earlier, the system is vulnerable.

Check Version:

docker images --format '{{.Repository}}:{{.Tag}}' | grep registry

Verify Fix Applied:

Attempt to authenticate with blank password after update - should fail. Check container logs for successful authentication attempts.

📡 Detection & Monitoring

Log Indicators:

  • Authentication attempts with blank/empty password
  • Successful root login from unexpected sources
  • Failed password attempts followed by successful login

Network Indicators:

  • SSH or authentication protocol traffic to registry container from unauthorized sources
  • Unusual data export from registry

SIEM Query:

source="docker" AND ("blank password" OR "empty password" OR "root login")

🔗 References

📤 Share & Export