CVE-2021-28925

9.8 CRITICAL

📋 TL;DR

This SQL injection vulnerability in Nagios Network Analyzer allows attackers to execute arbitrary SQL commands via the o[col] parameter in the api/checks/read/ endpoint. This affects all Nagios Network Analyzer installations before version 2.4.3, potentially leading to data theft, manipulation, or complete system compromise.

💻 Affected Systems

Products:
  • Nagios Network Analyzer
Versions: All versions before 2.4.3
Operating Systems: Linux, Windows
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default installation and requires no special configuration to be exploitable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data exfiltration, privilege escalation, and potential remote code execution on the underlying server.

🟠

Likely Case

Unauthorized access to sensitive network monitoring data, configuration information, and potential lateral movement within the network.

🟢

If Mitigated

Limited impact with proper input validation and database permissions, potentially only allowing data viewing without modification.

🌐 Internet-Facing: HIGH - Directly exploitable via web interface with no authentication required in vulnerable configurations.
🏢 Internal Only: HIGH - Even internal attackers can exploit this to gain unauthorized access to sensitive network monitoring data.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The vulnerability requires no authentication and has publicly available proof-of-concept code, making exploitation straightforward.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.4.3

Vendor Advisory: https://www.nagios.com/downloads/nagios-network-analyzer/change-log/

Restart Required: Yes

Instructions:

1. Download Nagios Network Analyzer 2.4.3 or later from the official Nagios website. 2. Follow the upgrade instructions in the documentation. 3. Restart the Nagios Network Analyzer service. 4. Verify the upgrade was successful.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement input validation to sanitize the o[col] parameter before processing

# Requires modifying the application code to validate/sanitize the o[col] parameter

Web Application Firewall Rules

all

Deploy WAF rules to block SQL injection patterns in the o[col] parameter

# WAF-specific configuration to block SQL injection patterns in the o[col] parameter

🧯 If You Can't Patch

  • Implement network segmentation to restrict access to Nagios Network Analyzer to authorized users only
  • Deploy a web application firewall with SQL injection detection rules specifically for the o[col] parameter

🔍 How to Verify

Check if Vulnerable:

Check the Nagios Network Analyzer version via the web interface or by examining the installation directory. Versions before 2.4.3 are vulnerable.

Check Version:

Check the web interface or examine the application files for version information. On Linux: grep -r 'version' /usr/local/nagiosna/ or similar installation directory.

Verify Fix Applied:

Verify the version is 2.4.3 or later and test the api/checks/read/ endpoint with SQL injection payloads to confirm they are blocked.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts followed by SQL error messages
  • Requests to api/checks/read/ with unusual o[col] parameter values

Network Indicators:

  • HTTP requests containing SQL keywords (SELECT, UNION, etc.) in the o[col] parameter
  • Unusual traffic patterns to the Nagios Network Analyzer API endpoint

SIEM Query:

source="web_logs" AND uri="/api/checks/read/" AND (param="o[col]" AND value CONTAINS "SELECT" OR value CONTAINS "UNION" OR value CONTAINS "OR 1=1")

🔗 References

📤 Share & Export