CVE-2025-34274

9.8 CRITICAL

📋 TL;DR

Nagios Log Server versions before 2024R2.0.3 run the embedded Logstash process with root privileges, creating a privilege escalation vulnerability. If an attacker compromises Logstash through insecure plugins, configuration injection, or input parsing flaws, they gain full root access to the system. This affects all Nagios Log Server deployments using vulnerable versions.

💻 Affected Systems

Products:
  • Nagios Log Server
Versions: All versions prior to 2024R2.0.3
Operating Systems: Linux (all supported distributions)
Default Config Vulnerable: ⚠️ Yes
Notes: All default installations are vulnerable as Logstash runs as root by default in affected versions.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with root-level code execution, allowing complete control over the server, data exfiltration, and lateral movement.

🟠

Likely Case

Privilege escalation to root via Logstash compromise, leading to unauthorized access, data manipulation, and persistence establishment.

🟢

If Mitigated

Limited impact to the 'nagios' user context if patched, reducing system-wide compromise risk.

🌐 Internet-Facing: HIGH - Logstash accepts network input and loads third-party components, making internet-facing instances prime targets.
🏢 Internal Only: MEDIUM - Internal instances still face risk from internal attackers or compromised plugins, but attack surface is reduced.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires compromising Logstash first through plugin vulnerabilities, configuration injection, or input parsing flaws.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2024R2.0.3

Vendor Advisory: https://www.nagios.com/changelog/#log-server

Restart Required: Yes

Instructions:

1. Backup current configuration and data. 2. Download Nagios Log Server 2024R2.0.3 from Nagios website. 3. Follow upgrade instructions in documentation. 4. Restart services to apply changes.

🔧 Temporary Workarounds

Manual Logstash User Change

linux

Manually configure Logstash to run as 'nagios' user instead of root

sudo systemctl stop nagios-logstash
sudo sed -i 's/user root/user nagios/g' /opt/nagioslogserver/logstash/config/logstash.yml
sudo chown -R nagios:nagios /opt/nagioslogserver/logstash
sudo systemctl start nagios-logstash

🧯 If You Can't Patch

  • Restrict network access to Logstash ports (5044, 9600) using firewall rules to trusted sources only.
  • Remove or audit all third-party Logstash plugins and restrict pipeline configuration changes to authorized administrators.

🔍 How to Verify

Check if Vulnerable:

Check if Logstash process is running as root: ps aux | grep logstash | grep -v grep | awk '{print $1}'

Check Version:

cat /opt/nagioslogserver/version.txt

Verify Fix Applied:

Verify Logstash runs as 'nagios' user: ps aux | grep logstash | grep -v grep | grep nagios

📡 Detection & Monitoring

Log Indicators:

  • Logstash process spawning unexpected child processes
  • Unauthorized configuration changes in logstash.yml
  • Privilege escalation attempts in system logs

Network Indicators:

  • Unusual outbound connections from Logstash ports
  • Suspicious input patterns to Logstash endpoints

SIEM Query:

process_name:"logstash" AND user:"root" OR process_name:"logstash" AND parent_process:"logstash" AND suspicious_command:*

🔗 References

📤 Share & Export