CVE-2021-3273

7.2 HIGH

📋 TL;DR

This vulnerability allows authenticated Nagios XI administrators to execute arbitrary code through code injection in the graphtemplates.php component. Attackers with admin credentials can compromise the Nagios XI server. Only Nagios XI installations below version 5.7 with admin accounts are affected.

💻 Affected Systems

Products:
  • Nagios XI
Versions: All versions below 5.7
Operating Systems: All platforms running Nagios XI
Default Config Vulnerable: ⚠️ Yes
Notes: Requires admin-level authentication to exploit. Default Nagios XI installations include admin accounts.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full server compromise allowing attackers to execute arbitrary commands, access sensitive monitoring data, and pivot to other systems in the network.

🟠

Likely Case

Attackers with stolen admin credentials could execute arbitrary code to install backdoors, exfiltrate monitoring data, or disrupt monitoring operations.

🟢

If Mitigated

With proper access controls and admin account security, impact is limited to authorized administrators only.

🌐 Internet-Facing: HIGH if Nagios XI is internet-facing and admin credentials are compromised.
🏢 Internal Only: MEDIUM as it requires admin credentials but could lead to lateral movement if exploited.

🎯 Exploit Status

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

Exploit requires admin credentials but is straightforward once authenticated. Public proof-of-concept code exists.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.7 and above

Vendor Advisory: https://www.nagios.com/downloads/nagios-xi/change-log/

Restart Required: No

Instructions:

1. Backup current Nagios XI configuration. 2. Download Nagios XI 5.7 or later from Nagios website. 3. Follow Nagios XI upgrade documentation. 4. Verify upgrade completed successfully.

🔧 Temporary Workarounds

Restrict Admin Access

linux

Limit admin account access to trusted IP addresses only

# Configure web server (Apache/nginx) to restrict /nagiosxi/admin/ to specific IPs
# Example Apache: Require ip 192.168.1.0/24

Disable Unused Admin Accounts

all

Remove or disable unnecessary admin accounts

# Nagios XI admin interface: Admin > Manage Users > Edit/Delete unused admin accounts

🧯 If You Can't Patch

  • Implement strict admin account policies with strong passwords and MFA
  • Monitor admin account activity and restrict access to Nagios XI admin interface

🔍 How to Verify

Check if Vulnerable:

Check Nagios XI version via web interface (Help > About) or command line: cat /usr/local/nagiosxi/var/xiversion

Check Version:

cat /usr/local/nagiosxi/var/xiversion

Verify Fix Applied:

Verify version is 5.7 or higher and test admin functionality remains working

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to /nagiosxi/admin/graphtemplates.php
  • Admin account logins from unusual locations/times
  • System command execution in web server logs

Network Indicators:

  • Unexpected outbound connections from Nagios XI server
  • Unusual traffic patterns to admin interface

SIEM Query:

source="web_access.log" AND uri="/nagiosxi/admin/graphtemplates.php" AND (method="POST" OR status>=400)

🔗 References

📤 Share & Export