CVE-2024-46256
📋 TL;DR
This CVE describes a command injection vulnerability in NginxProxyManager's Let's Encrypt certificate request function. An attacker can execute arbitrary commands on the server with the privileges of the NginxProxyManager process, leading to remote code execution. This affects administrators using NginxProxyManager version 2.11.3 to manage SSL certificates.
💻 Affected Systems
- NginxProxyManager
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise allowing attacker to execute arbitrary commands, install malware, pivot to other systems, and maintain persistent access.
Likely Case
Attacker gains shell access to the server, can read sensitive files, modify configurations, and potentially escalate privileges.
If Mitigated
Limited impact if proper network segmentation and least privilege principles are implemented, though the vulnerable service remains compromised.
🎯 Exploit Status
Exploitation requires access to the certificate request endpoint, which typically requires authentication.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.11.4 or later
Vendor Advisory: https://github.com/NginxProxyManager/nginx-proxy-manager/commit/99cce7e2b0da2978411cedd7cac5fffbe15bc466
Restart Required: Yes
Instructions:
1. Update NginxProxyManager to version 2.11.4 or later. 2. Restart the NginxProxyManager service. 3. Verify the fix by checking the version.
🔧 Temporary Workarounds
Disable Let's Encrypt Certificate Requests
allTemporarily disable the vulnerable functionality by restricting access to certificate management.
# Configure firewall rules to block access to certificate endpoints
# Modify Nginx configuration to restrict /api/certificates endpoints
🧯 If You Can't Patch
- Implement strict network segmentation to isolate NginxProxyManager from critical systems.
- Apply strict input validation and sanitization at the web application firewall level.
🔍 How to Verify
Check if Vulnerable:
Check if NginxProxyManager version is 2.11.3 by examining the application logs or configuration files.
Check Version:
docker exec nginxproxymanager cat /app/package.json | grep version
Verify Fix Applied:
Verify the version is updated to 2.11.4 or later and test the Let's Encrypt certificate request functionality.
📡 Detection & Monitoring
Log Indicators:
- Unusual command execution in logs
- Suspicious certificate requests with shell metacharacters
Network Indicators:
- Unexpected outbound connections from NginxProxyManager server
- Traffic to known malicious IPs
SIEM Query:
source="nginxproxymanager" AND (event="certificate_request" AND command="*" )
🔗 References
- https://github.com/NginxProxyManager/nginx-proxy-manager/blob/v2.11.3/backend/internal/certificate.js#L830
- https://github.com/NginxProxyManager/nginx-proxy-manager/commit/99cce7e2b0da2978411cedd7cac5fffbe15bc466
- https://github.com/NginxProxyManager/nginx-proxy-manager/pull/4073/commits/c39d5433bcd13993def222bbb2b6988bbb810a05
- https://github.com/barttran2k/POC_CVE-2024-46256