#8190 HTTP response splitting vulnerability on return_to param CVE-2018-1319

security (34)
Kenton Taylor

From a security reporter:

To trigger the vulnerability, an attacker would send a malicious
"/auth" URL to the victim.
The victim would access said URL, and login successfully.
The server would then respond with any HTTP headers the attacker
supplied in the malicious URL.
Please note that the URL points to the real Allura server, and
contains control characters (%0d%0a) in the return_to URL parameter.


The first URL will set the attacker-supplied cookie
(my-cookie-field=foobar) to the victim's session.
The second URL will make the server respond with a content length of
777, which will force the victim's browser to abort the rendering of
the page, since 777 will not match with the real content length.

return_to is used in many places, any of which could sanitize it. Seems like authenticate_request and LoginRedirectMiddleware and do_login and do_multifactor have the redirect() calls that are the critical spots though. _verify_return_to usage could be expanded.


  • Dave Brondsema

    Dave Brondsema - 2018-03-02

    More info:

    Here's a concrete example of leveraging the header splitting issue to get XSS in every page where Allura uses the WebFlash component (eg. every page accessible from the "Account" menu link):


    This can be used to exfiltrate the victim's _session_id cookie, for example.

    This malicious URL sets the "webflash" cookie with the following payload URL-encoded twofold:


    This payload is still a valid JSON object, which will be successfully loaded by WebFlash-0.1a9/webflash/__init__.py:pop_payload(). When the contents of "status" are rendered as part of the HTML page, "a" will be its computed value, while the rest of the payload will be interpreted as HTML/JavaScript.

    The affected pages can also be rendered useless, forcing Allura to return 500 errors in case pop_payload() cannot parse the contents of the webflash cookie as valid JSON. For example, this can be triggered if the malicious URL is missing the closing "}" (%257D).

  • Dave Brondsema

    Dave Brondsema - 2018-03-02
    • status: open --> review
    • assigned_to: Dave Brondsema
  • Dave Brondsema

    Dave Brondsema - 2018-03-06
    • summary: HTTP response splitting vulnerability on return_to param --> HTTP response splitting vulnerability on return_to param CVE-2018-1319
    • status: review --> closed
    • Reviewer: Kenton Taylor
  • Kenton Taylor - 2018-03-14
    • Milestone: unreleased --> v1.8.1
  • Dave Brondsema

    Dave Brondsema - 2018-03-15
    • private: Yes --> No

Log in to post a comment.