CVE-2021-3277
High · 7.2CVSS
7.2
EPSS
54.6%
Published
Jun 7, 2021
CISA due date
—
Cloudanix analysis
A logged-in administrator could misuse a Nagios XI feature to upload code and take control of the monitoring server.
- Exploitation
- Remote Authenticated
- Attacker needs
- High Privilege
- Complexity
- Low
- Impact
- Remote Code Execution
- Component
- Application
- Class
- RCE
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Nagios XI 5.7.5 and earlier contains an authenticated remote code execution vulnerability in the custom-includes component. The flaw is caused by insufficient validation in the rename functionality, allowing a privileged Nagios XI administrator to rename or place uploaded content with a PHP extension. Because these files can be served and executed by the web application, an attacker with administrative access can upload a PHP web shell or payload and execute arbitrary commands on the Nagios XI server with the privileges of the web server or application process.
Why it matters to the business
Successful exploitation can give an attacker control over the Nagios XI monitoring server. Because monitoring platforms often have broad visibility into infrastructure, stored credentials, alerting integrations, and network reachability, compromise can lead to service disruption, credential theft, tampering with monitoring data, disabled alerts, and pivoting into other systems. Although exploitation requires authenticated administrative access, the high EPSS score indicates meaningful exploitation likelihood where exposed or weakly governed Nagios XI admin access exists.
How an attack unfolds
An attacker first obtains valid Nagios XI administrator credentials through phishing, credential theft, password reuse, prior compromise, or abuse of an overprivileged account. After logging in to the Nagios XI web interface, the attacker accesses the custom-includes functionality and abuses the rename behavior to create or rename an uploaded file so that it has a PHP extension. The attacker places PHP code in that file, commonly a web shell or command-execution stub. Once the PHP file is reachable through the web server, the attacker requests it over HTTP or HTTPS and passes commands or payload parameters. The server executes the PHP code, giving the attacker remote command execution on the Nagios XI host. From there, the attacker may enumerate configuration files, harvest credentials or API tokens, modify monitoring checks, suppress alerts, install persistence, or use the monitoring server as a foothold for lateral movement.
How to fix it
Upgrade Nagios XI to a version newer than 5.7.5 that contains the vendor fix for improper validation in the custom-includes rename functionality. If immediate upgrade is not possible, restrict access to the Nagios XI administrative interface to trusted management networks or VPNs, enforce multi-factor authentication for administrators where supported, remove unnecessary admin accounts, rotate administrator credentials, and limit outbound connectivity from the Nagios XI server. Review web server configuration to prevent execution of uploaded files where feasible, and monitor or temporarily restrict use of custom-includes functionality until patched. After remediation, remove any unauthorized PHP files, web shells, or modified include files and rotate credentials stored or accessible on the Nagios XI host.
How to confirm the fix worked
Confirm the installed Nagios XI version is later than 5.7.5 or matches a vendor-supported fixed release. Validate that administrative users cannot use the custom-includes rename workflow to create executable PHP files. Review the web-accessible custom include directories and Nagios XI web root for unexpected .php files, recently modified files, or files containing command-execution functions. Confirm administrative access is restricted, stale admin accounts are removed, and web server logs no longer show requests to suspicious uploaded PHP files. Where possible, perform an authenticated security test in a non-production environment to verify that arbitrary PHP upload/rename and execution is blocked.
Typical attack path
- Acquire or compromise valid Nagios XI administrator credentials.
- Authenticate to the Nagios XI web interface.
- Navigate to the custom-includes functionality.
- Upload or stage a file containing PHP code.
- Abuse the vulnerable rename functionality to give the file a .php extension or otherwise make it executable by the web server.
- Request the PHP file over HTTP or HTTPS to execute attacker-controlled code.
- Run operating system commands under the web server/application user context.
- Harvest credentials, alter monitoring configuration, deploy persistence, or pivot to other reachable systems.
How to detect it
Investigate whether the vulnerability was already exploited by correlating Nagios XI administrative activity, web server access logs, filesystem changes, and process execution telemetry. Review Nagios XI audit and application logs for admin sessions involving custom-includes, file upload, rename, or configuration changes shortly before suspicious web requests. Inspect Apache or HTTP access logs for requests to newly created or unusual PHP files under Nagios XI web-accessible paths, especially followed by command parameters or outbound network connections. On the host, look for PHP files with recent modification times, web shell patterns, encoded payloads, or functions such as system, shell_exec, passthru, exec, proc_open, popen, base64_decode, and eval. Review process telemetry for the web server user spawning shells, interpreters, network tools, or reconnaissance commands. Check for unexpected changes to Nagios XI configuration, monitoring checks, notification settings, user accounts, cron jobs, SSH authorized_keys, and outbound connections from the monitoring server to unfamiliar IP addresses or ports.
- /usr/local/nagiosxi/html/includes/components/custom-includes/
- /usr/local/nagiosxi/html/includes/
- /usr/local/nagiosxi/html/
- custom-includes
- rename
- \.php
- system(
- shell_exec(
- passthru(
- exec(
- proc_open(
- popen(
- base64_decode(
- eval(
- /bin/sh
- /bin/bash
- cmd=
- command=
- c=
- GET /nagiosxi/
- POST /nagiosxi/
- apache2
- httpd
- www-data
- apache
What your security team should do
- Prioritize patching any Nagios XI instance running 5.7.5 or earlier, especially internet-accessible or broadly reachable administrative interfaces.
- Immediately audit Nagios XI administrator accounts for unknown, stale, shared, or overprivileged users.
- Restrict Nagios XI admin UI access to trusted networks and require strong authentication controls.
- Search for suspicious PHP files and recent modifications in Nagios XI custom include and web-accessible directories.
- Review HTTP access logs for requests to unusual PHP files, especially files created through custom-includes or with uncommon names.
- Review Nagios XI audit logs and application logs for administrative file upload, rename, or custom include activity.
- Rotate Nagios XI administrator passwords and any credentials stored on the Nagios XI server if compromise is suspected.
- Harden the host by limiting outbound network access, reducing file permissions, and disabling execution from upload/custom include locations where operationally possible.
The record
Nagios XI 5.7.5 and earlier allows authenticated admins to upload arbitrary files due to improper validation of the rename functionality in custom-includes component, which leads to remote code execution by uploading php files.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-8778 The MIPL Grouped Checkout Fields for WooCommerce – Customize & Organize Checkout Fields. CWE-434
- CVE-2026-12215 The OTP Login & Register Woocommerce plugin for WordPress is vulnerable to Authentication… CWE-434
- CVE-2026-18351 The Drag and Drop File Upload for Elementor Forms plugin for WordPress is vulnerable to… CWE-434
- CVE-2026-71805 An arbitrary file upload and path traversal vulnerability exists in LZ-litchi 1.0.0. CWE-434
- CVE-2026-26212 Rara One Click Demo Import plugin for WordPress before 1.3.5 contains an arbitrary file… CWE-434
- CVE-2026-54611 InstantCMS is a free and open source content management system. CWE-434
- CVE-2026-86666 A security flaw has been discovered in aircheng-org iWebShop-5 up to 5.15. CWE-434
- CVE-2026-50093 A vulnerability has been identified in Siveillance Control Pro V3.0 (All versions <… CWE-434