CVE-2021-38156
Medium · 5.4CVSS
5.4
EPSS
92.9%
Published
Sep 15, 2021
CISA due date
—
Cloudanix analysis
A flaw in older Nagios XI versions can let a logged-in attacker make an administrator’s browser run malicious code when editing dashboards.
- Exploitation
- Requires User Interaction
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- Application
- Class
- XSS
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Nagios XI versions before 5.8.6 contain a cross-site scripting flaw in the dashboard editing workflow at the dashboard page. A user with Nagios XI access can place attacker-controlled script content into dashboard-related input that is later executed in the browser of an administrative user who edits or views the affected dashboard context. Because the script runs in the authenticated Nagios XI web session, it can perform actions available to that user, read page-accessible data, manipulate dashboard content, and potentially abuse the administrator’s browser session within the application’s authorization boundaries.
Why it matters to the business
Successful exploitation can let an attacker abuse a Nagios XI administrator’s session to alter monitoring dashboards, mislead operations teams, access sensitive monitoring data visible in the web UI, or perform unauthorized application actions. Since Nagios XI is commonly used for infrastructure and service monitoring, compromise of administrative workflows can reduce trust in monitoring data and create operational blind spots. Although this issue is not listed in CISA KEV, the exploit maturity is reported as weaponized and EPSS is high, so exposed or unpatched deployments should be treated as a priority.
How an attack unfolds
An attacker first obtains a low-privileged Nagios XI account or otherwise gains the ability to create or modify dashboard content processed by the vulnerable dashboard editor. The attacker inserts a malicious JavaScript payload into a dashboard field that is not safely encoded by Nagios XI before 5.8.6. The attacker then waits for, tricks, or socially engineers an administrative user into editing or interacting with the affected dashboard page. When the administrator opens the vulnerable dashboard editing view, the browser executes the injected script in the context of the Nagios XI application session. The script can then perform same-origin actions as the administrator, such as reading page content, changing dashboard configuration, sending application requests, or exfiltrating data accessible to the page.
How to fix it
Upgrade Nagios XI to version 5.8.6 or later. If immediate upgrade is not possible, restrict access to the Nagios XI web interface to trusted administrative networks, limit dashboard creation and editing permissions to trusted users, review and remove untrusted dashboard content, and use a web application firewall rule to block common script-injection payloads in dashboard-related requests. Enforce least privilege for Nagios XI users and require re-authentication or MFA for administrative access where supported.
How to confirm the fix worked
Confirm the running Nagios XI version is 5.8.6 or later through the web UI, package manager, or installation metadata. Review all Nagios XI instances for externally reachable web access and verify that only trusted users can create or edit dashboards. In a non-production test environment, attempt to save harmless XSS test strings such as encoded script tags or event-handler attributes in dashboard fields and confirm they are rendered as inert text rather than executed. Also verify that existing dashboards do not contain embedded script, javascript: URIs, or suspicious HTML event handlers.
Typical attack path
- Identify a Nagios XI instance running a version earlier than 5.8.6.
- Authenticate to Nagios XI with an account that can create or modify dashboard content, or compromise such an account first.
- Inject JavaScript or HTML event-handler payloads into vulnerable dashboard input fields.
- Induce an administrative user to edit or view the affected dashboard workflow.
- Execute attacker-controlled JavaScript in the administrator’s browser session.
- Use the administrator’s session context to read sensitive UI data, alter monitoring dashboards, or submit unauthorized application requests.
How to detect it
Investigate whether suspicious dashboard content was created or edited before remediation. Review Nagios XI application logs, web server access logs, reverse proxy logs, WAF events, and authentication/session logs for requests to dashboard pages containing encoded or raw JavaScript payloads. Focus on activity involving low-privileged users modifying dashboards shortly before administrative users accessed or edited the same dashboards. Search for common XSS markers such as script tags, HTML event handlers, javascript: URIs, document.cookie access, fetch/XMLHttpRequest calls, and encoded equivalents. Review Nagios XI audit or change records for unexpected dashboard modifications, new dashboards with unusual names or descriptions, or dashboard content containing HTML/JavaScript. For host forensics, inspect web server logs under common Apache paths and Nagios XI logs for suspicious dashboard requests, then correlate with administrator login times and any unexpected configuration or dashboard changes after viewing the dashboard.
- /nagiosxi/dashboards
- /dashboards/
- dashboards/#
- %3Cscript
- <script
- %3C%2Fscript%3E
- </script>
- javascript:
- onerror=
- onload=
- onclick=
- document.cookie
- XMLHttpRequest
- fetch(
- eval(
- btoa(
- atob(
- /var/log/httpd/access_log
- /var/log/httpd/ssl_access_log
- /var/log/apache2/access.log
- /var/log/apache2/ssl_access.log
- /usr/local/nagiosxi/var/xidebug.log
- /usr/local/nagiosxi/var/cmdsubsys.log
What your security team should do
- Prioritize upgrade of all Nagios XI deployments to 5.8.6 or later because exploit code is considered weaponized and EPSS is high.
- Inventory Nagios XI instances and confirm none running versions before 5.8.6 are exposed to untrusted networks.
- Review dashboard content and dashboard change history for suspicious HTML, JavaScript, event handlers, or encoded script payloads.
- Restrict dashboard editing permissions to trusted administrators until patching and content review are complete.
- Search web, application, proxy, and WAF logs for dashboard requests containing script-injection patterns.
- Reset sessions for administrative users who interacted with suspicious dashboards and review their account activity for unauthorized changes.
- Add detection rules for script tags, javascript: URIs, and HTML event-handler attributes submitted to Nagios XI dashboard endpoints.
The record
In Nagios XI before 5.8.6, XSS exists in the dashboard page (/dashboards/#) when administrative users attempt to edit a dashboard.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|
Related vulnerabilities
- CVE-2026-96379 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96382 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96368 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96361 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96362 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96360 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96357 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79
- CVE-2026-96358 Improper Neutralization of Input During Web Page Generation ("Cross-site Scripting")… CWE-79