CVE-2026-124296

Net::Server::HTTP versions through 2.018 for Perl allow a single request to abort a worker with out-of-memory via the client's Content-Length used as a read size in exec_cgi

Published Nov 29, 2026 CVSS n/a EPSS < 1% KEV · Not listed
Description
Net::Server::HTTP versions through 2.018 for Perl allow a single request to abort a worker with out-of-memory via the client's Content-Length used as a read size in exec_cgi.

exec_cgi forwards the request body to the CGI script with read() calls sized by the Content-Length header. Perl grows the buffer to that size before reading, so a request declaring a huge length aborts the worker with an out-of-memory error that no eval can catch.

The same loop never treats a 0 return from read() as end of input. When the client closes its side before sending the declared body, the remaining length stays unchanged and the loop spins at full CPU until the request times out.

Any server that dispatches requests to a CGI script, including an app target given as an executable, is affected.

Analysis

AI-generated

Technical impact

Net::Server::HTTP versions up to 2.018 process the HTTP body for CGI scripts by allocating a buffer sized exactly to the client’s Content‑Length header. An attacker can send a request with an absurdly large length, causing the server to attempt to allocate that memory and ultimately fail, aborting the worker. The server then cannot serve any further requests from that worker, effectively denying service to normal traffic. Additionally, if the client prematurely closes the connection before sending the full body, the server’s read loop erroneously treats the un‑consumed length as constant, spinning at full CPU usage until a timeout occurs. The vulnerability is a memory allocation error (CWE‑789) combined with a resource exhaustion loop (CWE‑835).

Affected Systems

Any deployment that uses Net::Server::HTTP version 2.018 or earlier in a Perl web environment is affected. This includes generic Perl HTTP servers that forward requests to CGI executables—whether the CGI target is another script or arbitrary binary executable. No newer release of Net::Server::HTTP has been cited as fixed in this advisory.

Risk and Exploitability

The exposure is remote: an attacker who can send HTTP requests to the affected server can trigger the out‑of‑memory abort or CPU‑hungry loop. Although EPSS is not reported and the vulnerability is not listed in CISA KEV, the severity of the denial of service and the ease of triggering it suggest a high risk profile for systems exposed to untrusted network traffic. The exploit requires only the ability to insert a custom Content‑Length header and to optionally close the socket early—both trivial with standard HTTP tools. There are no known code‑execution or privilege‑escalation paths, but the impact on availability makes it a serious issue for production web services.

Remediation

Vendor Workaround

No fixed release is available. Apply the patch. For deployments that cannot apply the patch, run the server behind a reverse proxy that limits the request body size and buffers the whole body before forwarding it, or do not dispatch requests to CGI scripts.


OpenCVE Recommended Actions

  • Apply the vendor‑supplied patch CVE-2026-124296-r1.patch and restart the server as soon as possible.
  • If a patch cannot be applied immediately, run Net::Server::HTTP behind a reverse proxy that limits request body size and buffers the entire body before forwarding it to the CGI script, or configure the proxy to block all concurrent CGI dispatches from untrusted clients.
  • Configure the HTTP service to reject or rewrite excessively large Content‑Length headers or to enforce a maximum request size, thereby preventing the buffer allocation from exceeding a safe threshold.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description Net::Server::HTTP versions through 2.018 for Perl allow a single request to abort a worker with out-of-memory via the client's Content-Length used as a read size in exec_cgi. exec_cgi forwards the request body to the CGI script with read() calls sized by the Content-Length header. Perl grows the buffer to that size before reading, so a request declaring a huge length aborts the worker with an out-of-memory error that no eval can catch. The same loop never treats a 0 return from read() as end of input. When the client closes its side before sending the declared body, the remaining length stays unchanged and the loop spins at full CPU until the request times out. Any server that dispatches requests to a CGI script, including an app target given as an executable, is affected.
Title Net::Server::HTTP versions through 2.018 for Perl allow a single request to abort a worker with out-of-memory via the client's Content-Length used as a read size in exec_cgi
Weaknesses CWE-789
CWE-835
References

Subscriptions

No data.

Weaknesses
  • CWE-789

    Memory Allocation with Excessive Size Value

  • CWE-835

    Loop with Unreachable Exit Condition ('Infinite Loop')

Sources

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