Nagios XI OS Command Injection (CVE-2021-25298)
Published Last modified In CISA KEV since Sources: CVE.org
What is affected, what to do
Nagios XI version xi-5.7.5 is affected by OS command injection. The vulnerability exists in the file /usr/local/nagiosxi/html/includes/configwizards/cloud-vm/cloud-vm.inc.php due to improper sanitization of authenticated user-controlled input by a single HTTP request, which can lead to OS command injection on the Nagios XI server.
The vulnerability is being actively exploited; treat it as a priority. The available sources name no fixed version. Check the vendor guidance in the references below. Immediate actions, mitigation and detection rules are in the runbook below.
- Affected
- Nagios XI
lte 5.5.6..5.7.5
- Nagios XI
Not sure whether and how you are affected? Ask a question about this vulnerability
Metrics
8.8
XIEM Effective CVSS
Highest available CVSS rating from NVD and vendor data.
Source: NVD, CVSS v3
8.8
CVSS v3
Severity High on the scale from 0 to 10.
Source: CVE.org
73.6 %
EPSS score
High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
Source: FIRST EPSS, percentile 99.48
Show all metrics
- Severity
- Critical
Priority (0–325)
The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?
Read in glossary- 223.17 Methodology
Exploit maturity
An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.
Read in glossary- actively exploited
XIEM Effective CVSS
XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.
Read in glossary- 8.8 Methodology
CVSS v3
CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.
Read in glossary- 8.8
EPSS score
The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.
Read in glossary- 73.6 %
- High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
EPSS percentile
The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.
Read in glossary- 99.48
- Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
KEV status
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- Actively exploited
- Published
In CISA KEV since
The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.
Read in glossary- CISA assessment (SSVC)
- Exploitation: active · not automatable · Technical impact: total
- Source: CISA Vulnrichment, as of 4 February 2025
CWE
CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.
Read in glossary- CWE-78
Response and mitigation
Why act now?
Prioritisation rationale
The flaw is network-reachable with low complexity once any authenticated account is available. Public exploits commonly chain it with other Nagios XI bugs and weak or default credentials, and EPSS places it among the CVEs most likely to be exploited. CISA does not flag ransomware use. Even so, a compromised Nagios server hands attackers credentials and network reach into nearly all monitored infrastructure, making it an ideal lateral-movement pivot. For KRITIS and NIS2 organisations, treat remediation as critical: within 24 hours for internet-exposed or multi-user instances, and in this week's maintenance window for tightly segmented, admin-only deployments.
Runbook step 1
Immediate response (0-24 h)
- Inventory: Identify every Nagios XI instance and check its version (web UI Help → About, or
/usr/local/nagiosxi/var/xiversion). Versions 5.5.6 through 5.7.5 are affected. - Patch: Upgrade to a Nagios XI release later than 5.7.5. The patch is available from the vendor; look up the exact fixed version in the Nagios security advisory. Snapshot the VM and back up the
nagiosxi,nagiosqlandnagiosdatabases first. - Cut exposure now: If you cannot patch within hours, restrict the web UI (TCP 80/443, path
/nagiosxi/) to a management VLAN or VPN using the host or upstream firewall. Internet-facing instances come first. - Review accounts: Exploitation needs only a low-privileged authenticated account. Enumerate all Nagios XI users and disable unknown or stale ones. Force password resets for every non-admin account and regenerate API keys.
- Rule out compromise: Hunt the Apache access logs for hits on the
cloud-vmconfig wizard (see Detection). If you find evidence of exploitation, isolate the host and preserve it for forensics. - Rotate credentials: If compromise is suspected, treat every stored monitoring credential as exposed and rotate it. That includes SSH keys, SNMP communities, WMI/domain service accounts, database and cloud API credentials. Monitoring servers are credential vaults by design.
- Inventory: Identify every Nagios XI instance and check its version (web UI Help → About, or
Runbook step 2
Mitigation layers
- Network segmentation: Allow access to the Nagios XI web UI only from a dedicated management network. Apply egress filtering so the server can reach only required monitoring targets and ports. This breaks typical reverse shells (arbitrary ports to the internet) and payload staging (HTTP/HTTPS to unknown hosts).
- WAF / reverse proxy: Block requests to
/nagiosxi/config/monitoringwizard.phpthat carrywizard=cloud-vmand contain shell metacharacters in parameter values. Cover;,|,`,$(,&&and the encoded forms%3B,%7C,%60,%24%28. If the wizard is unused, deny it at the proxy outright. - IAM / least privilege: Remove config-wizard and configuration rights from non-admin users in the Nagios XI user settings. Put the login behind a reverse proxy enforcing MFA or SSO, and eliminate shared accounts.
- Configuration hardening: Disable or remove the unused wizard at
/usr/local/nagiosxi/html/includes/configwizards/cloud-vm/(Admin → Manage Config Wizards). - Privilege-escalation hardening: Minimise the sudo rules for
apacheandnagiosin/etc/sudoersand/etc/sudoers.d/. Check for writable scripts executed as root via sudo. This makes it harder to turn web-server-context command injection into root. - Endpoint hardening: Run SELinux in
enforcingmode where operationally feasible. Deploy an EDR agent or auditd execve monitoring on the server.
Runbook step 3
Detection rules
- Web server logs: Search Apache access and error logs (
/var/log/httpd/access_log) formonitoringwizard.phpwithwizard=cloud-vmand shell metacharacters in the query or POST body. SPL:index=web uri_path="*monitoringwizard.php" "wizard=cloud-vm" | regex _raw="(%3B|%7C|%60|%24%28|;|\||\$\()" - Process ancestry (EDR / Sysmon for Linux EID 1): Treat the chain
httpd→php→sh/bash→curl/wget/nc/python/perl/base64as suspicious. Sigma shape:ParentImage|endswith: '/httpd'ANDImage|endswith: ['/sh','/bash','/nc','/curl','/wget']ANDUser: apache. - auditd: Add
-a always,exit -F arch=b64 -S execve -F uid=apache -k nagiosxi_exec. Alert on binaries executed outside the regular plugin path (/usr/local/nagios/libexec/). - Network telemetry (Zeek/Suricata): Look for new outbound connections from the Nagios server to internet destinations or unusual ports (Zeek
conn.log,id.orig_h= Nagios IP, destination not in baseline). Also flag HTTP downloads of ELF binaries or shell scripts to the server. - Integrity and persistence: Monitor for new files under
/usr/local/nagiosxi/html/(webshells),/tmpand/dev/shm, and for new cron entries forapacheornagios. Also review the Nagios XI audit log for config-wizard use by non-admin accounts.
- Web server logs: Search Apache access and error logs (
Detection rules
No NEOSEC detection rule is available for this vulnerability yet.
Classification under NIS2 and CRA
Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.
NIS2
NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.
Read in glossary- Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
CRA
The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.
Read in glossary- Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
ISO/IEC 27001
ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.
Read in glossary- Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.
Description
Nagios XI version xi-5.7.5 is affected by OS command injection. The vulnerability exists in the file /usr/local/nagiosxi/html/includes/configwizards/cloud-vm/cloud-vm.inc.php due to improper sanitization of authenticated user-controlled input by a single HTTP request, which can lead to OS command injection on the Nagios XI server.
Source: CISA KEV Catalog, NVD (NIST), cvelistv5
Affected products
The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.
| Affected versions | Fixed in | ||
|---|---|---|---|
| nagios | nagios_xi |
|
|
Vendors and products
Weakness classes (CWE)
CWE-78Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Base
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
Entry at MITRE CWE-78
Public exploit references
Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.
| CISA KEV Catalog | CISA Known Exploited Vulnerability (opens in a new tab)cisa.gov | actively exploited | |
| Packet Storm | Nagios XI 5.7.5 Remote Code Execution (opens in a new tab)packetstormsecurity.com | PoC (publicly reported)reported, not verified | — |
| Packet Storm | Nagios XI 5.7.5 Remote Code Execution (opens in a new tab)packetstormsecurity.com | PoC (publicly reported)reported, not verified | — |
References & sources
- assets.nagios.comdownloads/nagiosxi/versions.php
- github.comfs0c-sh/nagios-xi-5.7.5-bugs/blob/main/README.md
- packetstormsecurity.comfiles/161561/Nagios-XI-5.7.5-Remote-Code-Execution.html
- packetstormsecurity.comfiles/170924/Nagios-XI-5.7.5-Remote-Code-Execution.html
- fastly.comblog/anatomy-of-a-command-injection-cve-2021-25296-7-8-with-met…
- cisa.govknown-exploited-vulnerabilities-catalog?field_cve=CVE-2021-25298government-resource
Changes to this CVE
Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).
NVD analysis modifiedNVD
NVD analysis modifiedNVD
Record modifiedMITRE
2 individual changes: Reference, Reference type
Show 2 original changes
Individual changes of this event as published by NVD Type Action Before After Reference removed http://nagios.com—Reference type removed http://nagios.com Types: Product—Source identifier: cve@mitre.org
Embed badge
Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.
<a href="https://intel.neosec.eu/en/cve/CVE-2021-25298"><img src="https://intel.neosec.eu/badge/cve/CVE-2021-25298.svg?lang=en" alt="CVE-2021-25298 – NEOSEC Intel" height="20"></a>