CVE-2021-40345

7.2 HIGH

📋 TL;DR

This is a command injection vulnerability in Nagios XI 5.8.5 that allows authenticated administrators to execute arbitrary system commands by uploading malicious ZIP files in the Manage Dashlets section. Attackers who gain administrator access can achieve remote code execution on the Nagios XI server.

💻 Affected Systems

Products:
  • Nagios XI
Versions: 5.8.5 and earlier versions (specifically mentioned in 5.8.5)
Operating Systems: Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Requires administrator privileges to access the Manage Dashlets section in the Admin panel.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise leading to lateral movement, data exfiltration, or deployment of ransomware across the monitoring infrastructure.

🟠

Likely Case

Privilege escalation from administrator to root/system-level access, allowing complete control over the Nagios XI server and potentially adjacent systems.

🟢

If Mitigated

Limited impact if proper access controls and input validation are in place, though authenticated administrators could still exploit the vulnerability.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires administrator credentials but is straightforward once access is obtained. Public proof-of-concept code exists.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Nagios XI 5.8.6 and later

Vendor Advisory: https://assets.nagios.com/downloads/nagiosxi/CHANGES-5.TXT

Restart Required: No

Instructions:

1. Backup current configuration. 2. Download Nagios XI 5.8.6 or later from Nagios website. 3. Follow Nagios XI upgrade instructions. 4. Verify the patch is applied by checking version.

🔧 Temporary Workarounds

Restrict Admin Panel Access

all

Limit access to the Admin panel and Manage Dashlets section to only essential personnel using network segmentation and strict access controls.

Disable ZIP Upload Feature

linux

Temporarily disable the ZIP file upload functionality in the Manage Dashlets section if not required for operations.

🧯 If You Can't Patch

  • Implement strict monitoring and alerting for any ZIP file uploads in the Manage Dashlets section
  • Apply network segmentation to isolate Nagios XI from critical systems and implement egress filtering

🔍 How to Verify

Check if Vulnerable:

Check Nagios XI version via web interface Admin > System Config > About or run: cat /usr/local/nagiosxi/var/xiversion

Check Version:

cat /usr/local/nagiosxi/var/xiversion

Verify Fix Applied:

Verify version is 5.8.6 or higher and test ZIP upload functionality with malicious payloads (in controlled environment).

📡 Detection & Monitoring

Log Indicators:

  • Unusual ZIP file uploads in Admin panel logs
  • Command execution patterns in system logs from Nagios processes
  • Failed authentication attempts followed by successful admin login

Network Indicators:

  • Unexpected outbound connections from Nagios XI server
  • Traffic to command-and-control infrastructure

SIEM Query:

source="nagios" AND ("upload" OR "dashlet" OR "admin") AND "zip"

🔗 References

📤 Share & Export