Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge rking's Avatar
    Join Date
    Aug 2005
    Posts
    192

    Default Exploit : Fetch other users' email addresses on older cPanel Builds

    This problem appears to stem from incorrect permissions on the .cpanel/ folder in older cPanel builds. In a past version, cPanel adjusted how .cpanel/ is created and what permissions it gets. At some point in the past, this folder was created with 755 permissions. It is now created with 700. cPanel staff was unable to find a changelog entry so I can't give a specific date on when this change occurred.

    If you are running a server which has been live for a few years, you will want to ensure your permissions on .cpanel/ are set to 700 for all accounts on the server. This should do it for you:

    Code:
    chmod 700 /home/*/.cpanel
    If older users have 755 permissions on the .cpanel/ folder, it is possible for any user on the server to fetch those users' .cpanel/email_accounts.yaml file and get a list of all valid email addresses.

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,891
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Exploit : Fetch other users' email addresses on older cPanel Builds

    Please report this to cPanel via the bugs link at top of page. Or click here.
    Fav cPlinks this week: Blog - cPanel & WHM 11.32 we love it! | cPanel University study for it! | Attracta is coming! we want this!

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge rking's Avatar
    Join Date
    Aug 2005
    Posts
    192

    Default Re: Exploit : Fetch other users' email addresses on older cPanel Builds

    I've already created a ticket on this and informed cPanel staff. I've PM'd you the ticket ID. I've filed a bug report as well.

  4. #4
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,891
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Exploit : Fetch other users' email addresses on older cPanel Builds

    Great, thanks!
    Fav cPlinks this week: Blog - cPanel & WHM 11.32 we love it! | cPanel University study for it! | Attracta is coming! we want this!

  5. #5
    Member InterServed's Avatar
    Join Date
    Jul 2007
    Posts
    172
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Exploit : Fetch other users' email addresses on older cPanel Builds

    Thank you for the report , i have found numerous accounts having the folder permission set to 755.

    made & used the following script to set it to 700:

    Code:
    #!/bin/bash
    ls /var/cpanel/users | while read a; do
    if [ -d "/home/$a/.cpanel" ] ;
    then
      echo ".cpanel directory found on user $a"
      echo "Setting permission for /home/$a/.cpanel to 700"
      /bin/chmod 700 "/home/$a/.cpanel"
    #remove following echo line if u want faster processing
      echo -e "\ndone\n"; sleep 2
    fi
    done
    echo -e "\nAll folders permission has been set. Script finished"
    InterServed Tehnologies.
    Affordable web hosting

  6. #6
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,300
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Exploit : Fetch other users' email addresses on older cPanel Builds

    As I mentioned in PM to rking, I've moved this thread to the security section of the forum due to the topic.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. Upgrading older users to SUEXEC and PHPSUEXEC
    By homerwsmith in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-07-2011, 09:10 AM
  2. Users creating email addresses
    By GrantW21 in forum cPanel Developers
    Replies: 1
    Last Post: 05-02-2011, 08:59 AM
  3. Users creating email addresses
    By GrantW21 in forum New User Questions
    Replies: 1
    Last Post: 05-02-2011, 08:59 AM
  4. Enable Cpanel Users to block email from defined IP addresses?
    By diesel12 in forum E-mail Discussions
    Replies: 3
    Last Post: 10-29-2009, 07:45 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube