Total Tests:
Stay in Touch

Get exclusive updates and invitations to our events and webinars:


Your data will stay confidential Private and Confidential

Multiple vulnerabilities in Open Journal Systems (OJS)

Advisory ID:HTB23079
Product:Open Journal Systems (OJS)
Vendor:Public Knowledge Project
Vulnerable Versions:2.3.6 and probably prior
Tested Version:2.3.6
Advisory Publication:February 29, 2012 [without technical details]
Vendor Notification:February 29, 2012
Vendor Fix:March 16, 2012
Public Disclosure:March 21, 2012
Latest Update:March 19, 2012
Vulnerability Type:Path Traversal [CWE-22]
Unrestricted Upload of File with Dangerous Type [CWE-434]
Cross-Site Scripting [CWE-79]
CVE References:CVE-2012-1467
CVE-2012-1468
CVE-2012-1469
Risk Level:Critical
CVSSv2 Base Scores:10 (AV:N/AC:L/Au:N/C:C/I:C/A:C)
10 (AV:N/AC:L/Au:N/C:C/I:C/A:C)
4.3 (AV:N/AC:M/Au:N/C:N/I:P/A:N)
Solution Status:Fixed by Vendor
Discovered and Provided:High-Tech Bridge Security Research Lab
 

Advisory Details:

High-Tech Bridge SA Security Research Lab has discovered multiple vulnerabilities in Open Journal Systems which can be exploited to manipulate local files, upload arbitrary files and perform Cross-Site Scripting (XSS) attacks.
1) Arbitrary File Manipulation in Open Journal Systems: CVE-2012-1467
1.1 Arbitrary File Deletion
Input passed via the "param" parameter to "/lib/pkp/lib/tinymce/jscripts/tiny_mce/plugins/ibrowser/scripts/rfiles.php" is not properly validated before being used in unlink() function. This can be exploited to delete arbitrary files via directory traversal sequences.
The vulnerability exists in "iBrowser" software component that is a built-in part of OJS 2.3.6 by default.
The following PoC (Proof-of-Concept) code is available:
http://[host]/lib/pkp/lib/tinymce/jscripts/tiny_mce/plugins/ibrowser/scripts /rfiles.php?lang=en&param=delete|/../../../../../../../../../../../../../../ ../../../../../temp/file_to_delete

1.2 Arbitrary File Renaming
Input passed via the "param" parameter to "/lib/pkp/lib/tinymce/jscripts/tiny_mce/plugins/ibrowser/scripts/rfiles.php" is not properly validated before being used in rename() function.
This can be exploited to rename and assign an arbitrary extension to files on the vulnerable system via directory traversal sequences, that can lead to arbitrary PHP code execution (if permitted by server configuration).
The vulnerability exists in "iBrowser" software component that is a built-in part of OJS 2.3.6 by default.
This PoC will rename a previously uploaded ".jpg" file to ".php" file using the null-byte technique:
http://[host]/lib/pkp/lib/tinymce/jscripts/tiny_mce/plugins/ibrowser/scripts /rfiles.php?lang=en&param=rename|file.jpg|file.php%00.jpg
File upload is available by default to registered users. Registration is also enabled by default.
The second PoC will move "file_to_move" to "1x.jpg" in uploads directory via directory traversal technique:
http://[host]/lib/pkp/lib/tinymce/jscripts/tiny_mce/plugins/ibrowser/scripts /rfiles.php?lang=en&param=rename|/../../../../../../../../../../../../../../ ../../../../../tmp/file_to_move|1x.jpg

2) Arbitrary File Upload in Open Journal Systems: CVE-2012-1468
Open Journal Systems does not properly verify malicious file extensions before upload, which may lead to arbitrary file upload and further arbitrary PHP code execution (if permitted by server configuration). Upper-register file extensions are not filtered (e.g. ".pHp"), as well as some potentially malicious file extensions (e.g. ".asp", ".cgi", ".html").
The following PoC code demonstrates exploitation of the vulnerability:
Malicious registered user shall start a new Submission:
http://[host]/index.php/[journal]/author/submit/1
on the second step of the Submission:
http://[host]/index.php/[journal]/author/submit/2?articleId=14
the user should upload test.pHp, test.asp, test.cgi, test.php3 or test.html file. The uploaded file will be available on the following URL:
http://[host]/files/journals/[journalid]/articles/[articleid]/submission/ori ginal/[newfilename]
The original file name will be changed, however it will be displayed to the user after upload (for example "16-28-1-SM.pHp"). File extension will remain the same.
Successful exploitation of this vulnerability requires the attacker to be registered and have "Author Role". Registration is enabled by default. Registered user is allowed to assign "Author Role" to himself by default.
Upload directory should also be located inside of web root (by default).

3) Multiple XSS in Open Journal Systems: CVE-2012-1469
3.1 Input passed via the "editor" and "callback" parameters to "/lib/pkp/lib/tinymce/jscripts/tiny_mce/plugins/ibrowser/ibrowser.php" script is not properly sanitised before being returned to the user. This can be exploited to execute arbitrary HTML and script code in user's browser session in the context of the affected website.
The vulnerability exists in "iBrowser" software component that is a built-in part of OJS 2.3.6 by default.
The following PoC codes are available:
http://[host]/lib/pkp/lib/tinymce/jscripts/tiny_mce/plugins/ibrowser/ibrowse r.php?editor=z&callback=x;};};alert%2834%29;{{&lang=en
http://[host]/lib/ pkp/lib/tinymce/jscripts/tiny_mce/plugins/ibrowser/ibrowser.php?editor=%27%2 9;};};alert%2834%29;{{a=x%28%27&callback=iBrowser_callback&lang=en


3.2 Input passed via the "URL" parameter to "index.php" script is not properly sanitised before being stored in the application's database. This lead to stored XSS vulnerability.
The following PoC code demonstrates the vulnerability:
On the submissions page URL:
http://[host]/index.php/[journal]/author/submit/3?articleId=[id]
the attacker should add a malicious code to the "URL" field:
"><script>alert(document.cookie)</script>
the XSS will be displayed here:
http://[host]/index.php/[submission]/author/submission/[id]

3.3 Method "String::stripUnsafeHtml()" in "/lib/pkp/classes/core/String.inc.php" that is used to sanitise user-supplied input does not sanitise user input properly. This lead to numerous stored XSSs in scripts where this method is used.
The following PoC demonstrates vulnerability exploitation:
On the following URL:
http://[host]/index.php/[journal]/author/submit/3?articleId=[id]
the attacker should inject malicious scripting code to the "Bio Statement" or "Abstract of Submission" fields:
<img src="x"/onerror=alert(document.cookie)>
or (browser specific):
<img style="width:expression(alert(document.cookie));"></a>
The stored XSS will be displayed here:
http://[host]/index.php/[submission]/author/submission/[id]
Successful exploitation of the 3.2 and 3.3 vulnerabilities requires the attacker to be registered and have "Author Role". Registration is enabled by default. Registered user is allowed to assign "Author Role" to himself by default.

How to Detect Path Traversal Vulnerabilities
Website Security Test
  • GDPR & PCI DSS Test
  • Website CMS Security Test
  • CSP & HTTP Headers Check
  • WordPress & Drupal Scanning
Try For Free

Solution:
Upgrade to OJS 2.3.7

More Information: http://pkp.sfu.ca/support/forum/viewtopic.php?f=2&t=8431


References:
[1] High-Tech Bridge Advisory HTB23079 - https://www.immuniweb.com/advisory/HTB23079 - Multiple vulnerabilities in Open Journal Systems (OJS).
[2] Open Journal Systems - http://pkp.sfu.ca/?q=ojs - Open Journal Systems (OJS) is a journal management and publishing system that has been developed by the Public Knowledge Project through its federally funded efforts to expand and improve access to research.
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® 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 weakness types.

Have additional information to submit?
Please feel free to send us any additional information related to this Advisory, such as vulnerable versions, additional exploitation details and conditions, patches and other relevant details.
Book a Call Ask a Question
Close
Talk to ImmuniWeb Experts
ImmuniWeb AI Platform
Have a Technical Question?

Our security experts will answer within
one business day. No obligations.

Have a Sales Question?
Email:
Tel: +41 22 560 6800 (Switzerland)
Tel: +1 720 605 9147 (USA)
*
*
*
*
Your data will stay private and confidential