Serious vulnerabilities in OpenX ad platform expose millions to risk

High-Tech Bridge Security Research Lab discovered multiple vulnerabilities in OpenX, which can be exploited to execute arbitrary PHP code, perform Cross-Site Scripting (XSS) attacks and compromise vulnerable system.

Local File Inclusion in OpenX: CVE-2013-3514

Input passed via “group” HTTP GET parameter to “/www/admin/plugin-preferences.php” and “/www/admin/plugin-settings.php” scripts is not properly verified before being used in PHP ‘include()’ function and can be exploited to include arbitrary local files via directory traversal sequences and URL-encoded NULL byte techniques.

The following PoC (Proof-of-Concept) code display contents of “/etc/passwd” file on vulnerable system using vulnerability in the first script:

The second PoC code displays content of “/etc/passwd” file on vulnerable system using vulnerability in the second script:

Successful exploitation of these vulnerabilities requires administrative privileges, however they can also be exploited by a remote non-authenticated attacker via CSRF vector, since the application is prone to Cross-Site Request Forgery (CSRF) attacks. In order to do so an attacker should trick logged-in OpenX administrator to open a specially crafted web page with CSRF exploit code.

Simple CSRF exploit below for the first vulnerability includes and executes “/tmp/file.php” script:

Simple CSRF exploit below for the second vulnerability includes and executes “/tmp/file.php” script:

Cross-Site Scripting (XSS) in OpenX: CVE-2013-3515

The vulnerability exists due to insufficient filtration of user-supplied data in “package” HTTP GET parameter passed to “/www/admin/plugin-index.php” script. A remote attacker can trick a logged-in administrator to open a specially crafted link and execute arbitrary HTML and script code in his browser in context of the vulnerable website.

The exploitation example below uses the “alert()” JavaScript function to display administrator’s cookies:

The vulnerability exists due to insufficient filtration of user-supplied data in “group” HTTP GET parameter passed to “/www/admin/plugin-settings.php” script. A remote attacker can trick a logged-in administrator to open a specially crafted link and execute arbitrary HTML and script code in his browser in context of the vulnerable website.

The exploitation example below uses the “alert()” JavaScript function to display administrator’s cookies:

Solution

Fixed by Vendor in SVN repository, revision 82710.

Replace the following files:

  • [CWE-98]
  • [CWE-79]
  • [CWE-79]
More about

Don't miss