High-Tech Bridge SA Security Research Lab has discovered multiple vulnerabilities in ocPortal, which can be exploited to perform Cross-Site Scripting (XSS) and Arbitrary File Disclosure attacks.
Multiple Cross-Site Scripting (XSS) in ocPortal: CVE-2012-1470
1.1 Input passed via the “path” and “line” GET parameters to /code_editor.php is not properly sanitised before being returned to the user.
This can be exploited to execute arbitrary HTML and script code in a user’s browser session in context of affected website.
The following PoC (Proof of Concept) demonstrates the vulnerabilities:
http://[host]/code_editor.php?path=%22%3E%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E
http://[host]/code_editor.php?path&line=%22%3E%3Cscript%3Ealert%28document.cookie%29;%3C/script%3E
Arbitrary File Disclosure in ocPortal: CVE-2012-1471
2.1 Input passed via the “file” GET parameter to /site/catalogue_file.php is not properly sanitised before being used in fopen() call.
This can be exploited by malicious people to disclose arbitrary file content and other potentially sensitive information.
The following PoC (Proof of Concept) demonstrates the vulnerability:
http://[host]/site/catalogue_file.php?original_filename=1.txt&file=%252e%252e%252f%252e%252e%252finfo.php