---
id: "CVE-2026-120651"
kind: "vulnerability"
aliases: ["CVE-2026-120651"]
title: "Perl CGI module: short request body hangs server process indefinitely"
severity: "medium"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["cgi", "package", "perl", "self-hosted"]
not_affected_if: ["cgi-module-5.00-or-later", "default-config"]
published_at: "2026-11-04T00:17:26+00:00"
first_seen_at: "2026-11-04T00:46:17+00:00"
updated_at: "2026-11-04T00:48:05+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120651", "first_seen_at": "2026-11-04T00:46:17+00:00"}]
---

# Perl CGI module: short request body hangs server process indefinitely

The Perl CGI module before 5.00 enters an infinite loop when a request's body is shorter than its declared Content-Length and the uploads-disabled setting is on. A single crafted request can keep a server process busy forever, which is a denial of service.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed CGI module version with `perl -MCGI -e 'print $CGI::VERSION'`
- Search application code and config for `DISABLE_UPLOADS` and `PUTDATA_UPLOAD`
- Check whether the app is a Perl CGI script that reads request bodies through this module

## Fix

- Upgrade the Perl CGI module to `5.00` or later

## Timeline

- 2026-11-04T00:46:17+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120651

## Documents

- [fix] Patch: github.com https://github.com/leejo/CGI.pm/commit/16d9f61acf8b844b7360e8d726338e3ce34dfa9f.patch
- [fix] Patch: github.com https://github.com/leejo/CGI.pm/commit/8a78305065690461ae283fa24e5ebe4ec8a22fbc.patch

## From the sources

CGI versions before 5.00 for Perl allow an infinite loop on a short request body when $DISABLE_UPLOADS is set.

When $CGI::PUTDATA_UPLOAD or an upload hook is set, read_postdata_putdata takes a request body that is not a form submission. With $CGI::DISABLE_UPLOADS set, it discards the body by reading until Content-Length bytes have arrived. Once a body shorter than its Content-Length runs out, every read returns 0, so the loop never ends.

A client can keep a server process spinning with one such request.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
