CVE DatabaseCVE-2021-25297
한국어 권고문 →
CVE-2021-252978.8/HIGHCISA KEVCWE-78

Nagios XI 5.7.5 Remote OS Command Injection Vulnerability (CVE-2021-25297) Security Advisory

⚡ Jump to Patch
Affected Vendors
nagios
Affected Components
nagios_xi
Published Date
2021-02-15
CVSS v3.1
8.8
HIGH
EPSS (30d)
56.7%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Nagios XI version 5.7.5

Impact

An authenticated attacker can execute arbitrary OS commands on the Nagios XI server via a single crafted HTTP request, potentially leading to full system compromise.

Mitigation

Immediately upgrade to the latest patched version of Nagios XI, and restrict access to the vulnerable configuration wizard path.

Affected Products & Version Scope

Nagios XI version 5.7.5

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Upgrade Nagios XI to the latest secure release. You can download and run the official upgrade script using the following commands:

bash
# Download and execute the Nagios XI upgrade script
cd /tmp
wget https://assets.nagios.com/downloads/nagiosxi/xi-latest.tar.gz
tar xzf xi-latest.tar.gz
cd nagiosxi
./upgrade

2. Temporary Workaround & Hardening Configuration

If patching cannot be applied immediately, restrict access to the vulnerable Switch wizard directory or configure your Web Application Firewall (WAF) to block requests containing shell metacharacters targeting the path.

nginx
# Nginx configuration example: Restricting access to the vulnerable path
location /nagiosxi/includes/configwizards/switch/ {
    allow 10.0.0.0/8;
    deny all;
}

3. Log Audit & IoC Verification Commands

Verify the currently installed Nagios XI version and inspect the web server access logs for any suspicious command injection attempts targeting switch.inc.php.

bash
# 1. Check the installed Nagios XI version
grep 'product_version' /usr/local/nagiosxi/html/config.inc.php

# 2. Search Apache access logs for suspicious requests targeting switch.inc.php
grep -i 'switch.inc.php' /var/log/httpd/access_log | grep -E '(%3B|%26|%7C|;|\&|\|)'
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
Cloudflare Enterprise & Pro WAF
Due to active exploitation in the wild (CISA KEV), immediately upgrade Nagios XI to the latest secure version.

Block Exploits Instantly with Managed Virtual Patching Rules

Can't patch production immediately? Deploy managed WAF rules at the edge to intercept RCE, SQLi, and deserialization payloads before they hit your origin server.

3-min setup · Automated Zero-Day Managed Rules
Practice Exploiting & Patching This Web Vulnerability in an Interactive Lab
Launch Hands-On Security Lab

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

This vulnerability (CVE-2021-25297) is an OS command injection flaw in Nagios XI, a widely used network monitoring solution. The root cause lies within the /usr/local/nagiosxi/html/includes/configwizards/switch/switch.inc.php script, which fails to properly sanitize and escape authenticated user-controlled input before passing it to system shell execution functions. This allows an authenticated user to inject arbitrary shell commands via a single HTTP request.

2. Exploitation Mechanics & Attack Scenario

To exploit this vulnerability, an attacker must first obtain valid credentials (even with low privileges) to access the Nagios XI web interface. The attacker then targets the Switch Config Wizard by sending a crafted HTTP POST or GET request containing shell metacharacters (such as ;, &&, or |) followed by malicious OS commands within the parameters. Because the PHP script executes these parameters directly in the system shell, the injected commands run with the privileges of the web server user (typically apache or nagios), enabling remote code execution.

3. Infrastructure & Business Impact

Since Nagios XI servers typically hold extensive monitoring privileges across enterprise networks, a compromise of this system is highly critical. Attackers can leverage the established foothold to harvest internal network credentials, map infrastructure topology, and perform lateral movement. Given that this vulnerability is actively exploited in the wild and listed in the CISA KEV catalog, failure to remediate poses an immediate threat of full network compromise.

Official Vendor Advisories & References

Frequently Asked SecOps Questions (CVE-2021-25297)

FAQ

Q1. How critical is CVE-2021-25297 and is it actively exploited in the wild?

CVE-2021-25297 is rated CVSS 8.8 (HIGH) with a 30-day EPSS exploitation probability of 56.7%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2021-25297?

Primary impacted vendors include nagios across nagios_xi. Scope summary: Nagios XI version 5.7.5

Q3. What temporary mitigations or workarounds exist for CVE-2021-25297 before patching?

[Mitigation] Immediately upgrade to the latest patched version of Nagios XI, and restrict access to the vulnerable configuration wizard path. Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2021-25297

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (nagios)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2021-25297 Nagios XI 5.7.5 Remote OS Command Injection Vulnerability (CVE-2021-25297) Security Advisory (CVSS 8.8) - Patch & Workaround | CVE Pulse