CVE-2024-23828

8.8 HIGH

📋 TL;DR

This vulnerability allows authenticated attackers to execute arbitrary commands on Nginx-UI servers via CRLF injection when modifying test_config_cmd or start_cmd parameters. It affects all Nginx-UI installations with versions before 2.0.0.beta.12. The vulnerability stems from an incomplete fix for previous command injection issues.

💻 Affected Systems

Products:
  • Nginx-UI
Versions: All versions before 2.0.0.beta.12
Operating Systems: Linux, Windows, macOS
Default Config Vulnerable: ⚠️ Yes
Notes: Requires authenticated access to the web interface. The vulnerability exists in the configuration management functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with attacker gaining root privileges, installing persistent backdoors, and pivoting to other systems in the network.

🟠

Likely Case

Unauthorized command execution leading to data theft, service disruption, or deployment of cryptocurrency miners.

🟢

If Mitigated

Limited impact due to network segmentation and restricted user permissions, potentially only affecting the Nginx-UI service.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authenticated access but is straightforward once credentials are obtained. The CRLF injection technique is well-documented.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.0.0.beta.12

Vendor Advisory: https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-qcjq-7f7v-pvc8

Restart Required: Yes

Instructions:

1. Backup current configuration. 2. Stop Nginx-UI service. 3. Update to version 2.0.0.beta.12 or later. 4. Restart Nginx-UI service. 5. Verify functionality.

🔧 Temporary Workarounds

Restrict Access

linux

Limit network access to Nginx-UI interface using firewall rules

iptables -A INPUT -p tcp --dport [nginx-ui-port] -s [trusted-ip] -j ACCEPT
iptables -A INPUT -p tcp --dport [nginx-ui-port] -j DROP

Disable Vulnerable Features

linux

Remove or restrict access to configuration modification features

chmod 000 /path/to/nginx-ui/config/modules

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate Nginx-UI from critical systems
  • Enforce strong authentication policies and monitor for suspicious login attempts

🔍 How to Verify

Check if Vulnerable:

Check Nginx-UI version via web interface or configuration files. Versions before 2.0.0.beta.12 are vulnerable.

Check Version:

grep version /path/to/nginx-ui/package.json or check web interface dashboard

Verify Fix Applied:

Confirm version is 2.0.0.beta.12 or later and test configuration modification functionality.

📡 Detection & Monitoring

Log Indicators:

  • Unusual command execution patterns in system logs
  • Multiple failed authentication attempts followed by configuration changes
  • CRLF sequences in configuration modification requests

Network Indicators:

  • Unexpected outbound connections from Nginx-UI server
  • Traffic to known malicious IPs or domains

SIEM Query:

source="nginx-ui" AND (event="config_modification" OR event="command_execution") | stats count by src_ip, user

🔗 References

📤 Share & Export