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 Robert Rothenberg 29 Nov 2026 23:49 UTC

========================================================================
CVE-2026-124299                                      CPAN Security Group
========================================================================

         CVE ID:  CVE-2026-124299

   Distribution:  Net-Server
       Versions:  through 2.018
       MetaCPAN:  https://metacpan.org/dist/Net-Server
       VCS Repo:  https://github.com/rhandom/perl-net-server

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

Description
-----------
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.

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.

Problem types
-------------
- CWE-243 Creation of chroot Jail Without Changing Working Directory

Workarounds
-----------
No fixed release is available. Apply the patch. For deployments that
cannot apply the patch, start the server with the chroot directory as
its working directory.

References
----------
https://metacpan.org/release/BBB/Net-Server-2.018/source/lib/Net/Server.pm
https://security.metacpan.org/patches/N/Net-Server/2.018/CVE-2026-124299-r1.patch