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

Published Nov 29, 2026 CVSS n/a EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Net::Server permits file access outside the chroot when the post_bind event calls chroot but does not change the working directory. This allows a handler that receives a request-influenced relative path to resolve that path against the actual filesystem, enabling an attacker to read or write arbitrary files with the server’s run-as user permissions. The compromise could expose credentials or modify system files and represents a CWE-243 weakness.

Affected Systems

The vulnerability affects the Perl module Net::Server versions 2.018 and earlier. Any deployment that starts the server with the chroot option enabled but does not change the working directory is susceptible. The patch is available for these versions via CPAN.

Risk and Exploitability

The CVSS and EPSS metrics are not available, and the vulnerability is not listed in the CISA KEV catalog. Attackers can exploit the flaw by sending a specially crafted request to a handler that opens a relative path, thereby gaining local file read or write access. The attack requires the handler to accept user-controlled paths and assumes the server process runs with elevated privileges. Because the flaw does not involve remote network access beyond normal server communication, the risk is primarily local and depends on the exposure of the vulnerable path.

Remediation

Vendor Workaround

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.


OpenCVE Recommended Actions

  • Apply the CVE-2026-124299-r1.patch to Net::Server to correct the chroot behavior.
  • If the patch cannot be applied, configure the server to start with the chroot directory as its working directory so that relative paths resolve correctly.
  • Review application code to avoid using request‑influenced relative paths or validate and sanitize any paths before opening files.

Generated by OpenCVE AI on November 30, 2026 at 00:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
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.
Title 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
Weaknesses CWE-243
References

Subscriptions

No data.

Weaknesses
  • CWE-243

    Creation of chroot Jail Without Changing Working Directory

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Nov 29, 2026, 11:30 PM
Reserved
Nov 7, 2026, 12:00 PM
Status
Received
Published
Nov 30, 2026, 12:17 AM
Modified
Nov 30, 2026, 12:17 AM