What is Nagios XI's LDAP Configuration Wizard?
Nagios XI includes configuration wizards that allow administrators to set up monitoring for various system types. The LDAP configuration wizard allows Nagios XI to monitor LDAP directories (Active Directory, OpenLDAP) by querying them via LDAP check commands. The wizard accepts parameters — including the LDAP server hostname or IP address — that are used to construct monitoring check commands executed on the Nagios XI server. When these parameters are not properly sanitized, they create OS command injection vulnerabilities: an attacker can inject shell commands into the LDAP check parameters, causing arbitrary commands to execute on the Nagios XI server with the elevated privileges of the Nagios backend process.
Overview
CVE-2021-25297 is an OS command injection vulnerability in Nagios XI's LDAP configuration wizard. The ldap_check parameter accepted by the wizard is incorporated into an OS command executed on the Nagios XI server without sanitization — an authenticated attacker with low-privilege credentials (PR:L) can inject arbitrary shell commands via this parameter, achieving root-level code execution on the monitoring server. CVE-2021-25297 is part of a three-CVE cluster (25296, 25297, 25298) discovered by Rana Khalil of Cisco Talos and patched in Nagios XI 5.7.5. All three affect different configuration wizards and were added to CISA KEV simultaneously in January 2022.
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 Nagios XI's LDAP wizard backend — the
ldap_checkparameter (controlling what LDAP server and query to test) is passed to a shell command used to verify LDAP connectivity without sanitizing shell metacharacters; injected sequences (;cmd,&&cmd,`cmd`) execute alongside the intended LDAP check command - Low-privilege exploitation: PR:L — any authenticated Nagios XI user can access the LDAP wizard endpoint and trigger the injection regardless of their role; Nagios XI's fine-grained access control does not prevent low-privilege users from reaching configuration wizard endpoints by default
- Root execution: Backend Nagios XI processes run with elevated OS privileges to execute monitoring checks and write configuration; injected commands inherit these privileges, achieving root-level code execution
- LDAP context adds credential exposure: LDAP wizard functionality likely involves stored LDAP/Active Directory credentials within Nagios; post-exploitation can retrieve these AD credentials for lateral movement
- Same impact as CVE-2021-25296/25298: All three Nagios XI command injection CVEs achieve equivalent root RCE outcomes through different injection points — patching one does not protect against the others; Nagios XI 5.7.5 patches all three simultaneously
Discovery
Discovered by Rana Khalil of Cisco Talos alongside CVE-2021-25296 and CVE-2021-25298. Patched in Nagios XI 5.7.5. The simultaneous discovery of three command injection flaws in different Nagios XI wizards reflects a systematic code review finding unsanitized parameter usage throughout the wizard framework.
Exploitation Context
See CVE-2021-25296 for the broader exploitation context of Nagios XI monitoring server vulnerabilities. CVE-2021-25297's LDAP wizard vector is particularly relevant in enterprise environments where Nagios XI is integrated with Active Directory for authentication or monitoring — LDAP credentials stored in Nagios may provide an attacker direct access to AD after exploiting this vulnerability. Network monitoring servers are among the highest-value pivot points in enterprise networks.
Remediation
- Update Nagios XI to version 5.7.5 or later — patches CVE-2021-25296, CVE-2021-25297, and CVE-2021-25298 together
- Restrict Nagios XI web interface to authorized administrators — prevent low-privilege users from accessing configuration wizard endpoints
- Restrict network access to the Nagios XI management interface; internet-accessible Nagios XI deployments should be firewalled immediately
- Rotate LDAP/Active Directory credentials stored in Nagios XI configurations after patching
- Review the Nagios XI server for unauthorized changes: new admin accounts, modified cron jobs, unexpected SSH keys, unusual outbound connections
- Apply patches for all three wizard CVEs simultaneously — each independently provides root RCE
Key Details
| Property | Value |
|---|---|
| CVE ID | CVE-2021-25297 |
| Vendor / Product | Nagios — Nagios XI |
| NVD Published | 2021-02-15 |
| NVD Last Modified | 2025-11-03 |
| CVSS 3.1 Score | 8.8 |
| CVSS 3.1 Vector | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Severity | HIGH |
| CISA KEV Added | 2022-01-18 |
| CISA KEV Deadline | 2022-02-01 |
| Known Ransomware Use | No |
CVSS 3.1 Breakdown
Required Action
Timeline
| Date | Event |
|---|---|
| 2021-02-13 | Nagios XI 5.7.5 released patching CVE-2021-25296, CVE-2021-25297, and CVE-2021-25298 |
| 2021-02-15 | CVE published; Rana Khalil (Cisco Talos) credited with discovery |
| 2022-01-18 | Added to CISA Known Exploited Vulnerabilities catalog |
| 2022-02-01 | CISA BOD 22-01 remediation deadline |
References
| Resource | Type |
|---|---|
| Nagios XI Changelog — Security Fix | Vendor Advisory |
| NVD — CVE-2021-25297 | Vulnerability Database |
| CISA KEV Catalog Entry | US Government |