CVE-2026-124292: Net::Server versions through 2.018 for Perl allow the run-as account to take ownership of any file via a symlink at the log or pid file path, which is opened and chowned as root at startup
Net::Server versions through 2.018 for Perl allow the run-as account to take ownership of any file via a symlink at the log or pid file path, which is opened and chowned as root at startup.
A server started as root with a user to drop to opens logfile, pidfile and, in Net::Server::HTTP, accesslogfile before the drop, then chowns each path to the run-as user. Both the open and the chown follow a symlink. Root creates a missing target, or opens an existing one for the log files, and the chown hands it to the run-as account.
An account that can write to the directory holding these files, typically the run-as account itself, gains ownership of any file it links to at the next start as root.
Affected Software
Event History
Frequently Asked Questions
What deployment conditions make this exploitable?
The server must be started as root and configured to drop privileges to a run-as user. The run-as account, or another account, must be able to write to the directory containing the configured log, PID, or Net::Server::HTTP access-log path.
What does an attacker need to do?
An attacker who can write to the relevant directory places a symlink at the log_file, pid_file, or access_log_file path pointing to a target file. On the next root-started server launch, the path is opened and chowned to the run-as account while following the symlink.
What is the impact of a successful exploit?
The run-as account gains ownership of the file selected by the symlink. For log files, root may create a missing target or open an existing target before ownership is changed.
Which file settings are involved?
The affected paths are log_file and pid_file, plus access_log_file when using Net::Server::HTTP. All are processed before the server drops privileges.