Liferay Calendar "exportFileName" path manipulation

Tested Versions:

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

Minded Security ReferenceID:



Discovered by
Stefano Di Paola of Minded Security
stefano.dipaola [_at_]



High: it is possible to execute code remotely


Upgrade to the latest version.


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.


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


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


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


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 for permission.


Implement the right DevSecOps automation and Continuous Web Application Scanning for your needs.

consulting minded security


We are a Consultancy Company focused in supporting Companies to develop secure products.

testing minded security


We performs software security analysis in white box mode and black box mode.

training minded security


Training and awareness in software security is critical for information security.