Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Sitelock reporting vulnerability on cpanel webmail login

Discussion in 'Security' started by whm-expert, Apr 28, 2014.

  1. whm-expert

    whm-expert Active Member

    Joined:
    Nov 10, 2012
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    DataCenter Provider
    hello every one
    i am using sitelock to protect one of our website. the website is using php CMS, and its have a php file that let the visitors directly login to their cpanel webmail.


    when i log to "sitelock dashboard" i see this error error message "Vulnerable(1)"
    URL:/http://xxxx.com/ar/webmail.php?login=&pass=1&port=2096&user=1
    Cross site scripting vulnerability found in args:login,pass,port,user

    please is there any other way to login to webmail without this problem?


    please check the script below
    ==========================
    Code:
    <html>
    <?php
    $domain = "XXXX.COM";
    
    if(!$_POST['login']) {
    exit;
    }
    
    $user = $_POST['user'];
    $pass = $_POST['pass'];
    $port = $_POST['port'];
    
    $port == "2096" || $port == "2087" || $port ==
    "2083" ? $pre = "https://" : $pre = "http://";
    $port == "2095" || $port == "2096" &&
    !eregi("@", $user) ? $user =
    "".$user."@".$domain."" : $user = $user;
    
    ?>
    <body onLoad="setTimeout('document.forms[0].submit();',10)">
    <form action="<?php echo
    "".$pre."".$domain.":".$port."/login/";
    ?>" method="post">
    <input type="hidden" name="user" value="<?php
    echo $user; ?>">
    <input type="hidden" name="pass" value="<?php
    echo $pass; ?>">
    </form>
    </body>
    </html>
    
    ==========================

    regards
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,323
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice