CVE-2016-15049
📋 TL;DR
Nagios Log Server versions before 1.4.2 contain a cross-site scripting vulnerability in the Dashboards section. When viewing log entries in the Logs table, malicious script content from logs can execute in users' browsers, potentially compromising their sessions. This affects all users of vulnerable Nagios Log Server instances.
💻 Affected Systems
- Nagios Log Server
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Attackers with access to inject malicious logs could steal administrator session cookies, perform actions as authenticated users, or redirect users to malicious sites.
Likely Case
Attackers who can write to monitored log files could inject XSS payloads that execute when administrators view those logs, potentially stealing session tokens.
If Mitigated
With proper input validation and output encoding, malicious scripts would be rendered harmless as text rather than executable code.
🎯 Exploit Status
Requires ability to write malicious content to logs that Nagios Log Server monitors, then requires victim to view those logs in the vulnerable interface.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.4.2 and later
Vendor Advisory: https://www.nagios.com/changelog/nagios-log-server-2024r1/
Restart Required: No
Instructions:
1. Backup current configuration and data. 2. Download Nagios Log Server 1.4.2 or later from official Nagios site. 3. Follow upgrade instructions in Nagios documentation. 4. Verify upgrade completed successfully.
🔧 Temporary Workarounds
Restrict Log Source Access
allLimit write access to log files monitored by Nagios Log Server to prevent injection of malicious content.
Disable Dashboards Access
allRestrict user access to the vulnerable Dashboards section if not required for operations.
🧯 If You Can't Patch
- Implement web application firewall (WAF) rules to detect and block XSS payloads in HTTP responses
- Monitor and alert on suspicious log entries containing script tags or JavaScript code patterns
🔍 How to Verify
Check if Vulnerable:
Check Nagios Log Server version via web interface or command line. Versions below 1.4.2 are vulnerable.
Check Version:
cat /usr/local/nagioslogserver/version.txt
Verify Fix Applied:
After upgrading to 1.4.2 or later, verify version and test that script tags in log entries are properly encoded when displayed.
📡 Detection & Monitoring
Log Indicators:
- Unusual log entries containing script tags, JavaScript code, or encoded payloads
- Multiple failed attempts to inject malicious content into logs
Network Indicators:
- HTTP requests containing XSS payload patterns to log submission endpoints
SIEM Query:
source="nagios_log_server" AND (message="*<script>*" OR message="*javascript:*" OR message="*onload=*" OR message="*onerror=*")