Cronjob ln -s symbolic security problem

specialgaming85

Registered
Oct 3, 2020
1
0
1
Turkey
cPanel Access Level
Root Administrator
Hello,

I configured my server as cPanel, CloudLinux, LiteSpeed, CWAF, CageFS, CXS.

All my services are running smoothly.

However, I can create a cronjob from one user and access other users' files symbolically.

For example, I can read the config.php file in user2's public_html folder by adding a cron to user1 as follows.

ln -s /home/user2/public_html/config.php config.txt

When cron runs in this way, a shortcut in the form of config.txt occurs on user1. When we view this config.txt file, the contents of the config.php file on user2 appear.

This is a very large vulnerability, how can I prevent this?

My English is not good. Forgive me.

thanks
 
Last edited by a moderator:

LucasRolff

Well-Known Member
Community Guide Contributor
May 27, 2013
141
84
78
cPanel Access Level
Root Administrator
> When we view this config.txt file, the contents of the config.php file on user2 appear

As what user are you viewing this file? as user1 or as root?