It was reported [1],[2] that an XSS vulnerability exists in Nagios when viewing the configuration and using command expansion, as there is no input validation for "expand" in config.c(gi):
View Config -> Command Expansion -> To expand -> <script>alert(String.fromCharCode(88,83,83))</script> View Config -> Command Expansion -> To expand -> <body onload=alert(666)>
or
http://www.example.com/nagios/cgi-bin/config.cgi?type=command&expand=<script>alert(String.fromCharCode(88,83,83))</script> [^] http://www.example.com/nagios/cgi-bin/config.cgi?type=command&expand=<body [^] onload=alert(666)>
[1] http://tracker.nagios.org/view.php?id=224 [2] http://seclists.org/bugtraq/2011/Jun/17
Cross-site scripting (XSS) vulnerability in Nagios allows remote attackers to inject arbitrary web script or HTML via specially-crafted 'layer' parameter passed to the Nagios network status map CGI script (statusmap.cgi).
References: [1] http://tracker.nagios.org/view.php?id=207 [2] http://www.rul3z.de/advisories/SSCHADV2011-002.txt [3] http://secunia.com/advisories/43287/
Public PoC (from [2): ===================== http://site/nagios/cgi-bin/statusmap.cgi?layer=' onmouseover="alert('XSS')" '
It was reported [1] that Nagios Core's history.cgi is vulnerable to a buffer overflow because it used sprintf on user-supplied data that was not restricted in size.
Due to various protections of the operating system (history.cgi is compiled with SSP, FORTIFYSOURCE is enabled, etc.) this is not believed to be exploitable and would result in a denial of service to the user sending the input to history.cgi.
This has been fixed in svn (r2547)[2].
[1] http://archives.neohapsis.com/archives/fulldisclosure/2012-12/0108.html [2] http://nagios.svn.sourceforge.net/viewvc/nagios?view=revision&revision=2547
status.cgi in Nagios 4.0 before 4.0 beta4 and 3.x before 3.5.1 does not properly restrict access to certain users that are a contact for a service, which allows remote authenticated users to obtain sensitive information about hostnames via the servicegroup (1) overview, (2) summary, or (3) grid style in status.cgi. NOTE: this behavior is by design in most 3.x versions, but the upstream vendor "decided to change it for Nagios 4" and 3.5.1.