CVE-2024-33661

9.1 CRITICAL

📋 TL;DR

CVE-2024-33661 is a URL redirection vulnerability in Portainer before version 2.20.0, allowing attackers to redirect users to malicious sites when the target is not index.yaml. This affects all users running vulnerable Portainer instances, potentially leading to phishing or further exploitation. The vulnerability stems from improper validation of redirect URLs.

💻 Affected Systems

Products:
  • Portainer
Versions: All versions before 2.20.0
Operating Systems: All supported OS (Linux, Windows, macOS)
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all default configurations of Portainer; no special settings required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could redirect authenticated users to malicious sites, leading to credential theft, malware installation, or session hijacking, potentially compromising the entire container management environment.

🟠

Likely Case

Most probable impact is phishing attacks where users are tricked into entering credentials on fake login pages, resulting in unauthorized access to Portainer.

🟢

If Mitigated

With proper network segmentation and user awareness, impact is limited to isolated incidents with minimal data exposure.

🌐 Internet-Facing: HIGH, as internet-facing instances are directly accessible to attackers, increasing the likelihood of exploitation.
🏢 Internal Only: MEDIUM, as internal instances still pose risk from insider threats or compromised internal systems.

🎯 Exploit Status

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

Exploitation requires user interaction (e.g., clicking a link), but technical complexity is low based on the CWE-601 description.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.20.0

Vendor Advisory: https://github.com/portainer/portainer/compare/2.19.4...2.20.0

Restart Required: Yes

Instructions:

1. Backup your Portainer data. 2. Update Portainer to version 2.20.0 or later using your deployment method (e.g., Docker pull portainer/portainer:2.20.0). 3. Restart the Portainer service to apply the patch.

🔧 Temporary Workarounds

Restrict Network Access

linux

Limit access to Portainer to trusted IP addresses only, reducing exposure to potential attackers.

Use firewall rules: e.g., iptables -A INPUT -p tcp --dport 9000 -s trusted_ip -j ACCEPT
iptables -A INPUT -p tcp --dport 9000 -j DROP

🧯 If You Can't Patch

  • Implement strict user access controls and monitor for suspicious redirect activities.
  • Use web application firewalls (WAF) to block malicious URL patterns and redirect attempts.

🔍 How to Verify

Check if Vulnerable:

Check the Portainer version via the web UI or API; if version is below 2.20.0, it is vulnerable.

Check Version:

docker exec portainer portainer --version or check the web UI dashboard.

Verify Fix Applied:

After updating, confirm the version is 2.20.0 or higher and test that redirects to non-index.yaml targets are blocked.

📡 Detection & Monitoring

Log Indicators:

  • Look for logs showing redirect attempts to unusual domains or URLs not matching index.yaml patterns.

Network Indicators:

  • Monitor for HTTP 3xx redirect responses from Portainer to external or suspicious domains.

SIEM Query:

Example: source="portainer.log" AND (http_status=3* AND url NOT LIKE "*index.yaml*")

🔗 References

📤 Share & Export