CVE-2026-48549
Executive Summary
CVE-2026-48549 is a cross-site request forgery (CSRF) vulnerability affecting Nagios Core versions prior to 4.5.13 and Nagios XI versions prior to 2026R1.5. The flaw resides in the cmd.cgi component, where the double-submit cookie protection mechanism can be bypassed when no Cookie header is present, allowing an attacker to submit forged requests that execute arbitrary Nagios commands as an authenticated user. With a CVSS score of 6.5, successful exploitation enables an attacker to perform high-integrity-impact actions on the Nagios monitoring platform, potentially disrupting monitoring operations, altering configuration, or impacting managed infrastructure. As of this report, no patch is available and no exploits have been publicly disclosed.
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.
No signup required
Technical Analysis
The vulnerability is a CSRF flaw (CWE-352) in the cmd.cgi interface of Nagios Core and Nagios XI. CSRF attacks exploit the trust that a web application places in an authenticated user's browser session, allowing an attacker to force a victim to submit unintended requests. Typically, CSRF defenses rely on anti-CSRF tokens validated server-side, or on the double-submit cookie pattern, where the token is submitted both as a cookie and as a request parameter, and the server verifies that they match.
In this specific case, the double-submit cookie mechanism is flawed. Under normal operation, the server sets a NagFormId cookie and expects the same value to be echoed in the POST body. However, the NVD description indicates that when no Cookie header is present in the request, the protection can be bypassed by simply supplying matching NagFormId and nagFormId values in the POST body. This suggests the server-side validation logic does not enforce the presence of the cookie, only that the two form fields match each other. An attacker can therefore generate a fixed pair of matching values and embed them in a malicious HTML form, submitting a crafted POST request to cmd.cgi without requiring the victim's browser to send any cookie at all.
The attack surface is the web-facing cmd.cgi endpoint, which accepts HTTP POST requests to execute Nagios commands. Because the endpoint processes state-changing operations (e.g., acknowledging alerts, scheduling checks, disabling notifications, restarting services), a CSRF exploit can perform any action permitted by the authenticated user's privileges. The vulnerability is only exploitable against authenticated users, hence the User Interaction (UI:R) requirement in the CVSS vector. However, the attacker can orchestrate this interaction by hosting a malicious page and luring the victim to it.
The root cause is an incomplete implementation of the double-submit cookie pattern: the absence of a check that the NagFormId cookie is actually present means the protection mechanism can be trivially disabled by omitting cookies entirely. No technical details beyond the parameter names NagFormId and nagFormId, and the endpoint cmd.cgi, are available in the public description.
Exploitation Scenarios
Reconnaissance / Target Identification: An attacker identifies a Nagios Core or Nagios XI instance exposed to the internet or to the internal network. This can be done via Shodan queries for Nagios product banners or by scanning for the distinctive Nagios login page and
cmd.cgiendpoint. The attacker also needs to identify an authenticated user who can be tricked into visiting a malicious page.Triggering the Flaw: The attacker crafts an HTML page containing an auto-submitting form. The form's action URL points to
http://target-nagios/nagios/cgi-bin/cmd.cgi(Core) or the equivalent XI path, and the method is POST. The form includes hidden input fields namedNagFormIdandnagFormIdwith identical arbitrary values, such as"attacker-controlled-token". The attacker hosts this page on an attacker-controlled domain.Payload / Execution Method: The victim, who is authenticated to the Nagios instance, visits the malicious page (e.g., via phishing email, watering hole, or ad). The browser automatically submits the form without user interaction. Because the request contains no Cookie header, the server's flawed CSRF check passes when it verifies the two matching form fields. The request to
cmd.cgiis processed as a legitimate command execution request from the authenticated user, executing whichever Nagios command is encoded in the form parameters.Post-Exploitation Impact: The attacker can execute any Nagios command the victim is authorized to run. Potential actions include: disabling monitoring checks for critical hosts, acknowledging or clearing alerts to hide security events, scheduling unwarranted downtime, restarting the Nagios service (causing availability impact), or modifying service and host configurations. These actions could degrade the organization's monitoring visibility, allowing real infrastructure issues or security incidents to go undetected.
No public PoC is available; this attack chain is inferred from the vulnerability class and the NVD description.
Impact Assessment
The CVSS vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N indicates a network-exploitable vulnerability with low attack complexity and no privileges required — the only user interaction required is the victim visiting a malicious page. Integrity impact is rated High (I:H), meaning the attacker can modify data or system state without constraints, while confidentiality and availability are not directly impacted (C:N, A:N). The scope is unchanged (S:U), meaning the vulnerability affects only the Nagios application, not the underlying OS or other connected resources.
Business impact is significant for organizations relying on Nagios for infrastructure monitoring. A successful attack would allow an external actor to:
- Suppress alerts and acknowledgments, blinding security and operations teams to ongoing incidents.
- Manipulate scheduled downtime or check thresholds, causing monitoring gaps.
- Alter configuration, disrupting the monitoring platform itself or the managed infrastructure.
The likelihood of exploitation is moderate: the vulnerability is easily triggered with a simple HTML form, and the only prerequisite is a victim session. However, there is no published PoC or evidence of weaponization in the wild at the time of writing, and the vulnerability has not been added to CISA's Known Exploited Vulnerabilities catalog.
Detection Guidance
Sigma Rule
title: Potential CSRF Exploitation of Nagios cmd.cgi
id: 8f14e45f-cea5-4b9b-9e3c-8a3f57a1b2c3
status: experimental
description: Detects POST requests to Nagios cmd.cgi containing NagFormId parameters without a corresponding Cookie header, indicative of CSRF bypass attempts.
logsource:
category: webserver
product: apache
definition: Web server logs for Nagios instances
detection:
selection:
http.method: POST
http.url|contains: cmd.cgi
http.url|contains|all:
- 'NagFormId='
- 'nagFormId='
filter:
http.cookie|contains: NagFormId
condition: selection and not filter
level: high
falsepositives:
- Legitimate requests where browser cookie handling is misconfigured
- Automated monitoring tools that do not send cookies
tags:
- attack.t1190
- cve.2026.48549
- cwe.352
YARA Rule
rule CVE_2026_48549_Nagios_CSRF_Payload
{
meta:
author = "Valters IT Security"
description = "Detects HTTP POST payloads targeting Nagios cmd.cgi with dual NagFormId parameters lacking cookie context"
cve = "CVE-2026-48549"
date = "2026-04-01"
strings:
$a = "cmd.cgi" ascii nocase
$b = "NagFormId=" ascii nocase
$c = "nagFormId=" ascii nocase
condition:
all of them and #b >= 1 and #c >= 1
}
Suricata IDS Rule
alert http any any -> $NAGIOS_SERVERS any (msg:"CVE-2026-48549 Nagios cmd.cgi CSRF Bypass Attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"cmd.cgi"; nocase; http.request_body; content:"NagFormId="; nocase; content:"nagFormId="; nocase; http.cookie; content:"NagFormId"; nocase; reference:cve,2026-48549; classtype:web-application-attack; sid:202648549; rev:1;)
Elastic Detection
sequence by host.name, source.ip with maxspan=1m
[network where event.category == "web" and http.request.method == "POST"
and url.path like "*cmd.cgi*"
and (url.query like "*NagFormId=*" or request.body like "*NagFormId=*")
and (url.query like "*nagFormId=*" or request.body like "*nagFormId=*")
and not request.headers.cookie like "*NagFormId*"]
Splunk SPL Query
index=web sourcetype=apache:access
| where method=="POST" AND uri_path LIKE "%cmd.cgi%"
AND (uri_query LIKE "%NagFormId=%" OR form_data LIKE "%NagFormId=%")
AND (uri_query LIKE "%nagFormId=%" OR form_data LIKE "%nagFormId=%")
AND NOT cookie LIKE "%NagFormId%"
| table _time, src_ip, dest_ip, uri_path, uri_query, form_data, cookie, user_agent
| stats count by src_ip, dest_ip
Wazuh OSSEC Rule
<group name="nagios,">
<rule id="100485" level="12">
<if_sid>31100</if_sid>
<match>POST</match>
<regex>cmd\.cgi</regex>
<regex>NagFormId=</regex>
<regex>nagFormId=</regex>
<description>CVE-2026-48549 - Nagios cmd.cgi CSRF bypass attempt detected</description>
<group>cve,2026-48549,attack.t1190,</group>
<mitre>
<id>T1190</id>
</mitre>
</rule>
</group>
Note: The if_sid value should be adjusted to an appropriate parent rule ID in the target Wazuh environment.
Mitigation & Patch Guidance
Patch confidence: 0/4 — UNPATCHED. No vendor advisory, patch release, or commit evidence is available from any tracked source at the time of writing.
Immediate mitigations:
- Restrict access to
cmd.cgi: Apply network-level access control lists (ACLs) or firewall rules to limit access to Nagios web interfaces to trusted administrative networks and IP ranges only. - Enable and enforce cookie-based CSRF tokens: If possible, configure Nagios to require a valid
NagFormIdcookie on all POST requests. Even without a patch, reviewing web server configuration to reject requests lacking cookies can be attempted, though this may break legitimate functionality. - Require multi-factor authentication (MFA): If supported, enabling MFA for all Nagios users adds an out-of-band authentication factor that is not automatically present during a CSRF attack.
- User awareness: Inform Nagios administrators of the risk of browsing untrusted links while logged into the monitoring interface, and encourage use of a separate browser profile for administrative tasks.
Patch/upgrade steps:
- Monitor vendor channels (Nagios security advisories, mailing lists, GitHub release notes) for updates to Core 4.5.13+ and XI 2026R1.5+.
- As soon as a patched version is released, upgrade all affected instances in a staged manner — test in a staging environment, then roll out to production.
- Verify the patch corrects the double-submit cookie logic, specifically ensuring the server rejects requests that omit the
NagFormIdcookie.
Long-term hardening:
- Deploy a web application firewall (WAF) with rules to inspect POST requests to
cmd.cgiand block those containing dual token fields without cookie headers. - Implement centralized logging and alerting on the Nagios web server to detect anomalous POST traffic to
cmd.cgi. - Ensure the Nagios management interface is not exposed to the public internet; place it on an isolated management VLAN with jump-host access.
- Regularly review user accounts and privilege assignments to minimize the blast radius of a successful CSRF attack.
References
- NVD Entry: https://nvd.nist.gov/vuln/detail/CVE-2026-48549 (NVD description and CVSS vector source)
- Nagios Core Official Site: https://www.nagios.org/projects/nagios-core/ (product version tracking and future advisory page)
- Nagios XI Product Page: https://www.nagios.com/products/nagios-xi/ (product version tracking and future advisory page)
- CWE-352 Cross-Site Request Forgery: https://cwe.mitre.org/data/definitions/352.html (vulnerability class reference)
- CISA Known Exploited Vulnerabilities Catalog (no entry — confirm negative): https://www.cisa.gov/known-exploited-vulnerabilities-catalog
No known threat actor campaigns or exploit-in-the-wild evidence exist for CVE-2026-48549 at the time of this report. The vulnerability was not present in the CISA KEV catalog, and no PoC or exploit code has been publicly released.
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.