CVE-2020-24263

8.8 HIGH

📋 TL;DR

CVE-2020-24263 is an insecure permissions vulnerability in Portainer that allows non-admin users to create Docker containers with dangerous capabilities like SYS_MODULE. This can lead to complete compromise of the Docker host system. All Portainer installations with non-admin users are affected.

💻 Affected Systems

Products:
  • Portainer
Versions: 1.24.1 and earlier
Operating Systems: All platforms running Docker
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects installations where non-admin users have access to Portainer. Admin-only installations are not vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the Docker host allowing attackers to install kernel modules, escalate privileges, and gain persistent access to the underlying infrastructure.

🟠

Likely Case

Attackers with non-admin Portainer access can escape container isolation and gain root privileges on the Docker host, potentially accessing other containers and sensitive data.

🟢

If Mitigated

With proper access controls and network segmentation, impact is limited to the specific Portainer instance and its associated containers.

🌐 Internet-Facing: HIGH - If Portainer is exposed to the internet, attackers can potentially gain initial access through other means and then exploit this vulnerability.
🏢 Internal Only: HIGH - Even internally, any compromised user account or insider threat can exploit this to gain host-level access.

🎯 Exploit Status

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

Exploitation requires authenticated access to Portainer as a non-admin user. The vulnerability is straightforward to exploit once access is obtained.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Portainer 1.24.2 and later

Vendor Advisory: https://github.com/portainer/portainer/issues/4105

Restart Required: Yes

Instructions:

1. Backup your Portainer data. 2. Stop the Portainer container. 3. Pull the latest Portainer image: docker pull portainer/portainer:latest. 4. Restart Portainer with your existing configuration.

🔧 Temporary Workarounds

Restrict Non-Admin Access

all

Remove all non-admin users from Portainer until patching is complete

# Remove non-admin users via Portainer UI or API
# Or disable Portainer entirely if not needed

Docker Daemon Hardening

linux

Configure Docker daemon to restrict dangerous capabilities

# Edit /etc/docker/daemon.json
{
  "default-ulimits": {},
  "authorization-plugins": [],
  "log-driver": "json-file",
  "disable-legacy-registry": true,
  "icc": false,
  "live-restore": true,
  "userland-proxy": false,
  "seccomp-profile": "/etc/docker/seccomp/default.json"
}

🧯 If You Can't Patch

  • Remove all non-admin user accounts from Portainer immediately
  • Implement network segmentation to isolate Portainer from critical systems

🔍 How to Verify

Check if Vulnerable:

Check Portainer version in the web interface or run: docker inspect portainer | grep -i version

Check Version:

docker inspect portainer | grep -i version

Verify Fix Applied:

Verify version is 1.24.2 or later and test that non-admin users cannot create containers with SYS_MODULE capability

📡 Detection & Monitoring

Log Indicators:

  • Non-admin users creating containers with elevated capabilities
  • Containers being created with SYS_MODULE or other dangerous capabilities
  • Unusual container creation patterns from non-admin accounts

Network Indicators:

  • Unexpected outbound connections from Docker host to external IPs
  • Unusual network traffic patterns from containers

SIEM Query:

source="portainer" AND (event="container_create" OR event="container_start") AND user_role="non-admin" AND capabilities="*SYS_MODULE*"

🔗 References

📤 Share & Export