CVE-2022-38254
Medium · 6.1CVSS
6.1
EPSS
2.1%
Published
Sep 7, 2022
CISA due date
—
Cloudanix analysis
A flaw in older versions of the Nagios monitoring software lets attackers run harmful code inside administrators' browsers when they view certain pages, which could let outsiders access or tamper with important systems.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Application
- Class
- XSS
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The vulnerability allows an attacker to inject arbitrary JavaScript code into the ajax.php script in the Configuration Management (CCM) component, which executes in the context of other users' browsers due to insufficient input sanitization.
Why it matters to the business
Attackers could steal session cookies, perform actions on behalf of administrators, or deface the monitoring interface, potentially disrupting IT operations oversight in environments using this widely deployed monitoring tool.
How an attack unfolds
An attacker crafts a malicious URL or input containing script payloads targeting the ajax.php endpoint in CCM. When an authenticated administrator loads the affected page, the injected script executes in their browser, enabling session hijacking or unauthorized actions.
How to fix it
Upgrade Nagios XI to version 5.8.7 or later to patch the XSS flaw in the ajax.php script within CCM 3.1.5.
How to confirm the fix worked
Confirm the installed Nagios XI version is 5.8.7 or higher; test the ajax.php endpoint with standard XSS test vectors such as script tags to verify input sanitization is active.
Typical attack path
- Scan for exposed Nagios XI instances running versions prior to 5.8.7
- Craft a reflected or stored XSS payload directed at ajax.php
- Deliver the payload through phishing emails or compromised sites
- Victim administrator accesses the link or dashboard, triggering script execution
- Attacker captures cookies, credentials, or performs actions via the victim's session
How to detect it
Inspect web server access logs for anomalous requests to ajax.php containing encoded script tags, event handlers, or unusual parameters; examine application or proxy logs for unexpected JavaScript execution or cookie exfiltration attempts.
What your security team should do
- Immediately upgrade all Nagios XI deployments to 5.8.7 or newer given the 1500+ days since disclosure
- Deploy web application firewall rules filtering script tags and event handlers on CCM endpoints
- Review and restrict unnecessary exposure of ajax.php to untrusted networks
- Enable content security policy headers to mitigate XSS impact
The record
Nagios XI before v5.8.7 was discovered to contain a cross-site scripting (XSS) vulnerability via the ajax.php script in CCM 3.1.5.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:16.04:LTS | icinga | 0 | No fix |
| Ubuntu:16.04:LTS | nagios3 | 0 | No fix |
| Ubuntu:18.04:LTS | icinga | 0 | No fix |
| Ubuntu:18.04:LTS | nagios3 | 0 | No fix |
| Ubuntu:20.04:LTS | nagios4 | 0 | No fix |
| Ubuntu:22.04:LTS | nagios4 | 0 | No fix |
| Ubuntu:24.04:LTS | nagios4 | 0 | No fix |
| Ubuntu:24.10 | nagios4 | 0 | No fix |
| Ubuntu:25.04 | nagios4 | 0 | No fix |
| Ubuntu:25.10 | nagios4 | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | icinga | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | nagios3 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | icinga | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | nagios3 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | nagios4 | 0 | No fix |
Related vulnerabilities
- CVE-2022-38247 Nagios XI v5.8.6 was discovered to contain a cross-site scripting (XSS) vulnerability via… Also affects icinga
- CVE-2022-38248 Nagios XI before v5.8.7 was discovered to contain multiple cross-site scripting (XSS)… Also affects icinga
- CVE-2022-38249 Nagios XI v5.8.6 was discovered to contain a cross-site scripting (XSS) vulnerability via… Also affects icinga
- CVE-2022-38250 Nagios XI v5.8.6 was discovered to contain a SQL injection vulnerability via the mib_name… Also affects icinga
- CVE-2022-38251 Nagios XI v5.8.6 was discovered to contain a cross-site scripting (XSS) vulnerability via… Also affects icinga
- CVE-2013-7108 Multiple off-by-one errors in Nagios Core 3.5.1, 4.0.2, and earlier, and Icinga before… Also affects nagios3
- 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