CVE-2021-25296 — Nagios XI OS Command Injection

CVE-2021-25296

Nagios XI Network Monitoring — Authenticated OS Command Injection via Windows WMI Configuration Wizard Enables Root Code Execution on Monitoring Server

What is Nagios XI?

Nagios XI is a widely deployed enterprise IT infrastructure and network monitoring platform used by thousands of organizations to monitor servers, network devices, applications, and services. The Nagios XI web interface provides administrators with configuration wizards for setting up monitoring of various systems — including Windows systems via WMI (Windows Management Instrumentation), SNMP devices, and LDAP directories. Because Nagios XI must interact with monitored systems (executing checks, running scripts, querying management interfaces), its backend processes have significant OS-level capabilities and run with elevated privileges on the monitoring server. OS command injection vulnerabilities in Nagios XI's configuration wizards give attackers who have obtained any authenticated access root-level code execution on the central monitoring server — compromising visibility into the entire monitored infrastructure.

Overview

CVE-2021-25296 is an OS command injection vulnerability in Nagios XI's Windows WMI configuration wizard. The wizard accepts a windowswmi_check parameter that is incorporated into an OS command executed on the Nagios XI server without proper sanitization. An authenticated attacker with low-privilege Nagios XI credentials (PR:L) can send a crafted request to the wizard endpoint with injected shell commands, achieving root-level code execution on the monitoring server. Discovered by Rana Khalil of Cisco Talos and patched in February 2021. CISA added it to KEV in January 2022, alongside CVE-2021-25297 and CVE-2021-25298 — all three affecting different Nagios XI configuration wizards.

Affected Versions

Product Vulnerable Fixed
Nagios XI before 5.7.5 Yes Nagios XI 5.7.5 (February 2021)

Technical Details

  • Root cause: OS command injection (CWE-78) in the Windows WMI configuration wizard — the windowswmi_check parameter accepted by the wizard's PHP backend is incorporated into a shell command (used to test WMI connectivity to a Windows host) without sanitization; injecting shell metacharacters causes arbitrary commands to execute on the Nagios XI server
  • Low-privilege exploitation: PR:L — any authenticated Nagios XI user, including non-administrative users with read-only or limited access, can access the configuration wizard endpoint and trigger the injection
  • Root execution context: Nagios XI backend processes run as root or with elevated privileges to execute monitoring checks and interact with the OS; commands injected via the WMI wizard execute in this privileged context, achieving root-level code execution
  • Monitoring server as pivot point: The Nagios XI server has credentials, network access, and knowledge of every monitored host in the environment — compromising it provides an attacker with a comprehensive map of the infrastructure and credentials for accessing monitored systems
  • Three concurrent wizard vulnerabilities: CVE-2021-25296 (WMI wizard), CVE-2021-25297 (LDAP wizard), and CVE-2021-25298 (SNMP/nagios.cgi) were all patched simultaneously, indicating a systemic failure to sanitize configuration wizard parameters — any of the three can achieve root RCE independently

Discovery

Discovered by Rana Khalil, security researcher at Cisco Talos, and reported to Nagios. All three Nagios XI command injection CVEs were patched in version 5.7.5 released February 13, 2021. CISA added all three to the KEV catalog simultaneously in January 2022, confirming active exploitation of Nagios XI monitoring servers.

Exploitation Context

Network monitoring platforms are high-value targets for advanced persistent threat actors because compromising the monitoring server provides: (1) a complete network topology map (all monitored hosts, services, and credentials), (2) connectivity to every monitored network segment (monitoring servers often bypass firewall restrictions to reach monitored devices), and (3) existing credentials for accessing monitored systems (Nagios stores SNMP community strings, SSH keys, and Windows credentials for performing checks). CVE-2021-25296's root RCE on the Nagios XI server gives attackers all of this. The January 2022 CISA KEV addition reflects targeted exploitation of enterprise Nagios XI deployments by threat actors seeking network access and credentials.

Remediation

  1. Update Nagios XI to version 5.7.5 or later to patch CVE-2021-25296, CVE-2021-25297, and CVE-2021-25298 simultaneously
  2. Restrict Nagios XI web interface access: only administrators should access configuration wizards; enforce role-based access control to limit low-privilege users' access to sensitive configuration endpoints
  3. Firewall Nagios XI management interface: restrict access to the Nagios XI web interface to authorized administrator IP ranges; prevent internet-accessible Nagios XI instances
  4. Review Nagios XI for indicators of compromise: unexpected cron jobs, new user accounts, unauthorized SSH keys added to the nagios user's authorized_keys
  5. Rotate all credentials stored in Nagios XI: SNMP community strings, SSH keys, Windows domain credentials, API keys — these should be treated as compromised if exploitation is suspected
  6. Monitor for unusual outbound connections from the Nagios XI server, which would indicate post-exploitation lateral movement

Key Details

PropertyValue
CVE ID CVE-2021-25296
Vendor / Product Nagios — Nagios XI
NVD Published2021-02-15
NVD Last Modified2025-11-03
CVSS 3.1 Score8.8
CVSS 3.1 VectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
SeverityHIGH
CISA KEV Added2022-01-18
CISA KEV Deadline2022-02-01
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Required Action

CISA BOD 22-01 Deadline: 2022-02-01. Apply updates per vendor instructions.

Timeline

DateEvent
2021-02-13Nagios XI security patches released for CVE-2021-25296, CVE-2021-25297, and CVE-2021-25298
2021-02-15CVE published; Rana Khalil (Cisco Talos) credited with discovery
2022-01-18Added to CISA Known Exploited Vulnerabilities catalog
2022-02-01CISA BOD 22-01 remediation deadline

References

ResourceType
Nagios XI Changelog — Security Fix Vendor Advisory
NVD — CVE-2021-25296 Vulnerability Database
CISA KEV Catalog Entry US Government