CVE-2026-124299: Net::Server versions through 2.018 for Perl allow file access outside the chroot jail via relative paths when post_bind calls chroot without chdir
Net::Server versions through 2.018 for Perl allow file access outside the chroot jail via relative paths when postbind calls chroot without chdir.
The working directory stays wherever the server was started, outside the new root. Relative paths, and paths climbing from it with .., resolve against the real filesystem.
A request handler that opens a request-influenced relative path can read or write files outside the jail with the run-as user's permissions, which the chroot option exists to prevent.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
After calling chroot in Net::Server's post_bind, change the working directory to the new root so relative paths resolve inside the jail.
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Deployments are exposed when Net::Server's post_bind path calls chroot without also changing the working directory. The issue matters if a request handler opens a relative path influenced by a request.
What does an attacker need to exploit it?
An attacker needs to cause a request handler to open a request-influenced relative path. Relative paths, including paths using .. traversal, can then resolve from the server's pre-chroot working directory outside the jail.
What access could exploitation provide?
The attacker may be able to read or write files outside the chroot jail. Access is limited to the permissions of the user account under which the server runs.
What can be done if the available patch cannot be applied immediately?
Ensure the process changes its working directory after chroot, so relative paths resolve within the jail. Also avoid opening request-influenced relative paths in handlers.