---
id: "CVE-2026-120636"
kind: "vulnerability"
aliases: ["CVE-2026-120636"]
title: "Perl CGI: crafted REQUEST_URI builds redirects to other hosts"
severity: "medium"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["cgi.pm", "package", "perl", "web-apps"]
not_affected_if: ["cgi-not-used", "version-5.00-or-later"]
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:23+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120636", "first_seen_at": "2026-11-04T00:46:16+00:00"}]
---

# Perl CGI: crafted REQUEST_URI builds redirects to other hosts

The Perl CGI module builds URLs for links and forms from the client-supplied REQUEST_URI without validation. An attacker can make those links and form posts point to another host, or inject a javascript: URL.

_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 for `url(-absolute=>1)`, `url(-relative=>1)` and `start_form` calls.

## Fix

- CGI for Perl: upgrade to `5.00` or later.

## Timeline

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

## Documents

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

## From the sources

CGI versions before 5.00 for Perl allow open redirects and script injection via URLs built from REQUEST_URI in url and start_form.

url(-absolute=>1), url(-relative=>1) and the default start_form action are built from the client-supplied REQUEST_URI without validation. The result can be protocol-relative (//evil.example), absolute-form (http://evil.example/) or contain backslashes, and url(-relative=>1) can return a javascript: URL. Links and form posts built from these URLs can go to another host.

---

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