Vulnerabilities > CVE-2012-6096 - Improper Restriction of Operations Within the Bounds of A Memory Buffer vulnerability in multiple products
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
PARTIAL Integrity impact
PARTIAL Availability impact
PARTIAL Summary
Multiple stack-based buffer overflows in the get_history function in history.cgi in Nagios Core before 3.4.4, and Icinga 1.6.x before 1.6.2, 1.7.x before 1.7.4, and 1.8.x before 1.8.4, might allow remote attackers to execute arbitrary code via a long (1) host_name variable (host parameter) or (2) svc_description variable.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Buffer Overflow via Environment Variables This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
- Overflow Buffers Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
- Client-side Injection-induced Buffer Overflow This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
- Filter Failure through Buffer Overflow In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
- MIME Conversion An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.
Exploit-Db
description Nagios3 history.cgi Host Command Execution. CVE-2012-6096. Remote exploit for linux platform file exploits/linux/remote/24159.rb id EDB-ID:24159 last seen 2016-02-02 modified 2013-01-16 platform linux port published 2013-01-16 reporter metasploit source https://www.exploit-db.com/download/24159/ title Nagios3 history.cgi Host Command Execution type remote description Nagios history.cgi Remote Command Execution. CVE-2012-6096. Remote exploits for multiple platform file exploits/multiple/remote/24084.py id EDB-ID:24084 last seen 2016-02-02 modified 2013-01-13 platform multiple port published 2013-01-13 reporter blasty source https://www.exploit-db.com/download/24084/ title Nagios history.cgi Remote Command Execution Vulnerability type remote
Metasploit
description | This module abuses a command injection vulnerability in the Nagios3 history.cgi script. |
id | MSF:EXPLOIT/UNIX/WEBAPP/NAGIOS3_HISTORY_CGI |
last seen | 2020-05-29 |
modified | 2018-08-20 |
published | 2013-01-15 |
references | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-6096 |
reporter | Rapid7 |
source | https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/unix/webapp/nagios3_history_cgi.rb |
title | Nagios3 history.cgi Host Command Execution |
Nessus
NASL family Fedora Local Security Checks NASL id FEDORA_2013-0732.NASL description Update to 3.4.4; CVE-2012-6096 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-03-17 modified 2013-01-23 plugin id 63658 published 2013-01-23 reporter This script is Copyright (C) 2013-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/63658 title Fedora 18 : nagios-3.4.4-1.fc18 (2013-0732) NASL family Gentoo Local Security Checks NASL id GENTOO_GLSA-201412-23.NASL description The remote host is affected by the vulnerability described in GLSA-201412-23 (Nagios: Multiple vulnerabilities) Multiple vulnerabilities have been discovered in Nagios. Please review the CVE identifiers referenced below for details. Impact : A remote attacker may be able to execute arbitrary code, cause a Denial of Service condition, or obtain sensitive information. Workaround : There is no known workaround at this time. last seen 2020-06-01 modified 2020-06-02 plugin id 79976 published 2014-12-15 reporter This script is Copyright (C) 2014-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/79976 title GLSA-201412-23 : Nagios: Multiple vulnerabilities NASL family SuSE Local Security Checks NASL id OPENSUSE-2013-54.NASL description - fixed Stack based buffer overflow in web interface: bnc#797237 - CVE-2012-6096 - icinga-fix-bnc797237.patch last seen 2020-06-05 modified 2014-06-13 plugin id 75069 published 2014-06-13 reporter This script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/75069 title openSUSE Security Update : icinga (openSUSE-SU-2013:0206-1) NASL family Debian Local Security Checks NASL id DEBIAN_DSA-2616.NASL description A buffer overflow problem has been found in nagios3, a host/service/network monitoring and management system. A malicious client could craft a request to history.cgi and cause application crashes. last seen 2020-03-17 modified 2013-02-04 plugin id 64439 published 2013-02-04 reporter This script is Copyright (C) 2013-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/64439 title Debian DSA-2616-1 : nagios3 - buffer overflow in CGI scripts NASL family SuSE Local Security Checks NASL id OPENSUSE-2013-45.NASL description - imported upstream version 1.7.4 - bnc#797237 - core: add fix for CVE-2012-6096 - history.cgi remote command execution (Eric Stanley, Markus Frosch) #3532 - MF - core: fix embedded perl segfault #3027 - MF - core: fix duplicated events on check scheduling logic for new events (Andreas Ericsson) #2676 #2993 - MF - core: avoid duplicate events when scheduling forced host|service check (Imri Zvik) #2993 - MF - core: get rid of the instame macro usage while logging alerts and states (Andreas Ericsson) #2665 - MF - core: revamp the detection of embedded perl usage directive last seen 2020-06-05 modified 2014-06-13 plugin id 75020 published 2014-06-13 reporter This script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/75020 title openSUSE Security Update : icinga (openSUSE-SU-2013:0169-1) NASL family CGI abuses NASL id NAGIOS_CORE_344.NASL description The remote web server hosts a version of Nagios Core that is affected by a buffer overflow vulnerability. By sending a specially crafted request using the last seen 2020-06-01 modified 2020-06-02 plugin id 63563 published 2013-01-16 reporter This script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/63563 title Nagios Core history.cgi Multiple Parameter Buffer Overflow NASL family SuSE Local Security Checks NASL id SUSE_11_NAGIOS-130211.NASL description This update fixes a stack overflow in nagios web interface. CVE-2012-6096 has been assigned. last seen 2020-06-05 modified 2013-02-28 plugin id 64926 published 2013-02-28 reporter This script is Copyright (C) 2013-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/64926 title SuSE 11.2 Security Update : nagios (SAT Patch Number 7328) NASL family Fedora Local Security Checks NASL id FEDORA_2013-0753.NASL description Update to 3.4.4; CVE-2012-6096 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-03-17 modified 2013-01-23 plugin id 63660 published 2013-01-23 reporter This script is Copyright (C) 2013-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/63660 title Fedora 17 : nagios-3.4.4-1.fc17 (2013-0753) NASL family Fedora Local Security Checks NASL id FEDORA_2013-0752.NASL description Update to 3.4.4; CVE-2012-6096 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-03-17 modified 2013-01-23 plugin id 63659 published 2013-01-23 reporter This script is Copyright (C) 2013-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/63659 title Fedora 16 : nagios-3.4.4-1.fc16 (2013-0752) NASL family SuSE Local Security Checks NASL id OPENSUSE-2013-41.NASL description - avoid stack based buffer overflow in web interface (history): added nagios-history_buffer_overflow.patch - (bnc#797237) fixes CVE-2012-6096 last seen 2020-06-05 modified 2014-06-13 plugin id 74997 published 2014-06-13 reporter This script is Copyright (C) 2014-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/74997 title openSUSE Security Update : nagios (openSUSE-SU-2013:0140-1) NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_97C22A945B8B11E2B131000C299B62E1.NASL description full disclosure reports : history.cgi is vulnerable to a buffer overflow due to the use of sprintf with user-supplied data that has not been restricted in size. last seen 2020-06-01 modified 2020-06-02 plugin id 63470 published 2013-01-11 reporter This script is Copyright (C) 2013-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/63470 title FreeBSD : nagios -- buffer overflow in history.cgi (97c22a94-5b8b-11e2-b131-000c299b62e1) NASL family Debian Local Security Checks NASL id DEBIAN_DSA-2653.NASL description It was discovered that Icinga, a host and network monitoring system, contains several buffer overflows in the history.cgi CGI program. last seen 2020-03-17 modified 2013-03-27 plugin id 65696 published 2013-03-27 reporter This script is Copyright (C) 2013-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/65696 title Debian DSA-2653-1 : icinga - buffer overflow NASL family SuSE Local Security Checks NASL id SUSE_NAGIOS-8460.NASL description This update fixes a stack overflow in the nagios web interface. CVE-2012-6096 has been assigned. last seen 2020-06-05 modified 2013-02-28 plugin id 64927 published 2013-02-28 reporter This script is Copyright (C) 2013-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/64927 title SuSE 10 Security Update : nagios (ZYPP Patch Number 8460)
Packetstorm
data source https://packetstormsecurity.com/files/download/119528/nagios3-exec.txt id PACKETSTORM:119528 last seen 2016-12-05 published 2013-01-15 reporter Blasty source https://packetstormsecurity.com/files/119528/Nagios-3.x-Remote-Command-Execution.html title Nagios 3.x Remote Command Execution data source https://packetstormsecurity.com/files/download/119600/nagios3_history_cgi.rb.txt id PACKETSTORM:119600 last seen 2016-12-05 published 2013-01-17 reporter Blasty source https://packetstormsecurity.com/files/119600/Nagios3-history.cgi-Host-Command-Execution.html title Nagios3 history.cgi Host Command Execution
Saint
bid | 56879 |
description | Nagios 3 history.cgi Command Injection |
osvdb | 88322 |
title | nagios3_history_cgi_cmd_injection |
type | remote |
Seebug
bulletinFamily exploit description No description provided by source. id SSV:77822 last seen 2017-11-19 modified 2014-07-01 published 2014-07-01 reporter Root source https://www.seebug.org/vuldb/ssvid-77822 title Nagios history.cgi Remote Command Execution Vulnerability bulletinFamily exploit description No description provided by source. id SSV:60596 last seen 2017-11-19 modified 2013-01-16 published 2013-01-16 reporter Root source https://www.seebug.org/vuldb/ssvid-60596 title Nagios 3.x Remote Command Execution(CVE-2012-6096)
References
- http://lists.grok.org.uk/pipermail/full-disclosure/2012-December/089125.html
- http://lists.opensuse.org/opensuse-updates/2013-01/msg00033.html
- http://lists.opensuse.org/opensuse-updates/2013-01/msg00060.html
- http://lists.opensuse.org/opensuse-updates/2013-01/msg00077.html
- http://lists.opensuse.org/opensuse-updates/2013-01/msg00088.html
- http://secunia.com/advisories/51863
- http://www.debian.org/security/2013/dsa-2616
- http://www.debian.org/security/2013/dsa-2653
- http://www.exploit-db.com/exploits/24084
- http://www.exploit-db.com/exploits/24159
- http://www.nagios.org/projects/nagioscore/history/core-3x
- http://www.osvdb.org/89170
- http://www.securityfocus.com/bid/56879
- https://bugzilla.redhat.com/show_bug.cgi?id=893269
- https://dev.icinga.org/issues/3532
- https://www.icinga.org/2013/01/14/icinga-1-6-2-1-7-4-1-8-4-released/