---
id: "CVE-2026-120632"
kind: "vulnerability"
aliases: ["CVE-2026-120632"]
title: "Perl CGI module: crafted Content-Type header can exhaust CPU"
severity: "medium"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["cgi", "package", "perl", "web-apps"]
not_affected_if: ["cgi-not-used", "static-hosting"]
published_at: "2026-11-04T00:17:24+00:00"
first_seen_at: "2026-11-04T00:46:16+00:00"
updated_at: "2026-11-04T00:48:26+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120632", "first_seen_at": "2026-11-04T00:46:16+00:00"}]
---

# Perl CGI module: crafted Content-Type header can exhaust CPU

The Perl CGI module before 5.00 parses the multipart/related Content-Type header with a regular expression that backtracks heavily on non-matching input. A single crafted POST header can tie up CPU, causing 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'`
- Look for `CGI` in cpanfile, Makefile.PL or other Perl dependency files and confirm the pinned version
- Find whether the app uses CGI's XForms multipart handling on POST endpoints

## Fix

- CGI versions `5.00` and later (per the advisory; patch linked in sources)

## Timeline

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

## Documents

- [fix] Patch: github.com https://github.com/leejo/CGI.pm/commit/1e529c7ac8d410a51b4b04ab9d6cc00d51ef33c0.patch

## From the sources

CGI versions before 5.00 for Perl allow CPU exhaustion via a backtracking regex on the XForms multipart/related Content-Type.

When a POST Content-Type contains multipart/related, the boundary and start parameters are extracted with an unanchored pattern that puts .+ on either side of the boundary capture, which backtracks in cubic time on a header that does not match. No request body is needed.

---

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