CVE-2026-124301 in Net::Server
Summary
by MITRE • 11/30/2026
Net::Server::HTTP versions through 2.018 for Perl allow process exhaustion via a forked child that returns to the accept loop when a trusted script dies in exec_trusted_perl.
exec_trusted_perl forks and the child loads the script with require. When the script dies before any header is sent, the child re-throws the error instead of exiting. The error unwinds into the request handler the child inherited from the worker, which sends a 500 response and returns to the accept loop. The child is now an extra worker that the server never forked, counts or signals, and it keeps running after the server is stopped.
Under the PreFork and Single server types, every request the script rejects with die adds one such process, past max_servers. Each extra worker inherits the failed require, so it fails later requests for that script and spawns another.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 11/30/2026
The vulnerability in Net::Server::HTTP versions through 2.018 represents a critical resource management flaw within the Perl web server framework, specifically affecting how child processes are handled during trusted script execution. This issue stems from an improper error handling mechanism in the exec_trusted_perl subroutine, which is designed to execute external scripts with elevated privileges or specific trust contexts. When this function forks a new process to run a script, it expects that process to terminate cleanly after completing its task or upon encountering a fatal error that necessitates termination. However, the current implementation fails to enforce an exit condition when the loaded Perl script dies before sending any HTTP headers. Instead of terminating the child process as intended, the framework allows the exception to propagate back into the inherited request handler context. This causes the child process to send a standard 500 Internal Server Error response and then loop back to accept new connections, effectively transforming it from a transient worker into a persistent background daemon that operates outside the server's control logic.
From an operational perspective, this behavior leads directly to resource exhaustion, specifically through uncontrolled process proliferation. In configurations utilizing PreFork or Single server types, where the number of concurrent workers is strictly capped by max_servers settings, each request that triggers a die event in the trusted script results in one additional orphaned worker process. These processes are not tracked by the parent server's management system, meaning they do not count toward the configured limit and cannot be signaled or terminated via standard server control mechanisms. Consequently, as attackers repeatedly trigger these errors, often through automated fuzzing scripts or targeted denial-of-service attacks, the number of running Perl interpreter instances grows indefinitely until it consumes all available system memory and CPU resources. This results in a complete service outage for legitimate users, effectively achieving a Denial of Service against the hosting infrastructure without requiring authentication or complex exploitation techniques beyond triggering the specific error condition.
The technical root cause lies in the unwinding behavior of exceptions within the Perl runtime environment when integrated with Net::Server's event loop. When require fails to load a script due to syntax errors, missing dependencies, or explicit die statements executed before header output, the exception is not caught and handled by exiting the process. Instead, it bubbles up into the request handler that was inherited from the parent worker during forking. This handler interprets the situation as a completed but erroneous transaction rather than a fatal failure requiring process termination. The subsequent return to the accept loop creates an infinite cycle where the orphaned child continues listening on the socket, accepting new connections and repeating the same faulty logic if it attempts to load the same problematic script again. This recursive spawning amplifies the impact rapidly, as each failed attempt spawns another persistent listener that further degrades system stability.
This vulnerability aligns with CWE-787 Out-of-bounds Write in a broader sense of resource allocation failure, but more accurately maps to CWE-400 Uncontrolled Resource Consumption and CWE-252 unchecked return value regarding the fork operation's lifecycle management. In terms of attack patterns, this is consistent with ATT&CK technique T1496 Resource Hijacking, where an adversary leverages system resources for their own benefit or to disrupt service availability. The lack of proper process isolation and termination protocols allows a low-privilege attacker to escalate the impact from a simple application error into a systemic infrastructure compromise by exhausting critical computing assets.
Mitigation strategies must focus on enforcing strict lifecycle management for forked processes within the Net::Server framework. Developers should ensure that any code path involving exec_trusted_perl explicitly calls exit or _exit after handling errors, particularly when exceptions occur before header transmission. Patching to a version of Net::Server later than 2.018 is essential, as these versions likely include fixes for proper exception propagation and process termination logic. Additionally, system administrators should implement monitoring tools that detect anomalous spikes in Perl interpreter processes or zombie states, allowing for rapid identification and manual intervention if the vulnerability is exploited before a patch can be applied. Configuring server timeouts and resource limits at the operating system level via cgroups or ulimit settings can also provide a secondary layer of defense by preventing any single user or process group from consuming excessive resources, thereby limiting the blast radius of such an attack even if the application-level flaw remains unpatched temporarily.