CVE-2020-35189

9.8 CRITICAL

📋 TL;DR

This vulnerability allows remote attackers to gain root access to Kong Docker containers by using a blank password for the root user. Systems running affected Kong Docker images are vulnerable, particularly those exposed to untrusted networks. The issue specifically affects Alpine-based Kong Docker images before version 1.0.2-alpine.

💻 Affected Systems

Products:
  • Kong API Gateway Docker Image
Versions: All versions before 1.0.2-alpine
Operating Systems: Alpine Linux (Docker container)
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Alpine-based Kong Docker images. Other Kong distributions or Docker base images are not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with root-level access, allowing attackers to execute arbitrary commands, steal sensitive data, install malware, or pivot to other systems.

🟠

Likely Case

Unauthorized root access leading to data exfiltration, service disruption, or deployment of cryptocurrency miners or other malicious payloads.

🟢

If Mitigated

Limited impact if container runs with non-root user, network access is restricted, and proper security monitoring is in place.

🌐 Internet-Facing: HIGH - Containers exposed to the internet can be directly attacked without authentication.
🏢 Internal Only: MEDIUM - Internal attackers or compromised systems could exploit this, but requires network access to the container.

🎯 Exploit Status

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

Exploitation is trivial - attackers simply need SSH or direct access to the container with blank password authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.0.2-alpine and later

Vendor Advisory: https://github.com/Kong/docker-kong/security/advisories

Restart Required: Yes

Instructions:

1. Update Docker image: docker pull kong:1.0.2-alpine or later
2. Stop and remove existing container
3. Deploy new container with updated image
4. Verify no blank root password exists

🔧 Temporary Workarounds

Run container as non-root user

linux

Configure Kong container to run with a non-root user to limit impact even if exploited

docker run --user 1000:1000 kong:tag

Set root password

linux

Manually set a strong root password in the container

docker exec -it <container> passwd
Enter new password when prompted

🧯 If You Can't Patch

  • Restrict network access to Kong containers using firewall rules or network policies
  • Implement strict network segmentation and monitor for unauthorized access attempts

🔍 How to Verify

Check if Vulnerable:

Check if container uses Kong image before 1.0.2-alpine: docker images | grep kong
Test root login: docker exec -it <container> su - root (try blank password)

Check Version:

docker inspect <container> | grep -i kong

Verify Fix Applied:

Verify image version is 1.0.2-alpine or later and root login with blank password fails

📡 Detection & Monitoring

Log Indicators:

  • Failed or successful SSH/root login attempts
  • Unusual root-level commands in container logs

Network Indicators:

  • Unexpected SSH connections to container ports
  • Outbound connections from Kong containers to suspicious destinations

SIEM Query:

source="docker" AND (event="login" OR user="root") AND result="success"

🔗 References

📤 Share & Export