CVE-2026-120636

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

Published Nov 3, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability arises because the CGI module constructs redirect URLs and form action attributes directly from the client‑supplied REQUEST_URI without performing any validation. Functions url(-absolute=>1), url(-relative=>1) and the default start_form action can generate protocol‑relative URLs (//evil.example), absolute URLs (http://evil.example/) or URLs that contain backslashes and even javascript: schemes. When these URLs are rendered in links or form actions, an attacker can cause the browser to navigate to a malicious host or execute arbitrary JavaScript in the context of the victim’s browser.

Affected Systems

Affected products are all installations of Perl’s CGI.pm version earlier than 5.00. The module is maintained by LEEJO and the fix increments the version to 5.00 or later. Any web application that imports CGI.pm before this release and relies on the url() or start_form() functions for generating user‑visible links or form actions is potentially vulnerable.

Risk and Exploitability

Although no EPSS score is available and the vulnerability is not listed in the CISA KEV catalog, the lack of input validation makes exploitation trivial via specially crafted URLs; no authentication is required. The CVSS score of 6.1 indicates moderate severity. An attacker can redirect users to phishing sites or inject client‑side scripts, undermining confidentiality and integrity of the user session.

Remediation

Vendor Solution

Upgrade to CGI 5.00 or later.


OpenCVE Recommended Actions

  • Upgrade CGI.pm to version 5.00 or later.
  • If an upgrade is not immediately possible, validate or sanitize the REQUEST_URI value before passing it to url() or start_form() to prevent construction of protocol‑relative, absolute, or javascript: URLs.
  • Implement web‑application firewall rules or CSP policies that block or disable javascript: schemes, protocol‑relative URLs, and backslash‑separated URLs used in user‑generated links and form actions.

Generated by OpenCVE AI on November 4, 2026 at 13:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

threat_severity

Moderate

Type Values Removed Values Added
Description 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.
Title CGI versions before 5.00 for Perl allow open redirects and script injection via URLs built from REQUEST_URI in url and start_form
Weaknesses CWE-601
CWE-79
References

Subscriptions

No data.

Weaknesses
  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Nov 9, 2026, 7:10 PM
Reserved
Nov 2, 2026, 5:40 PM
Status
Deferred
Published
Nov 4, 2026, 12:17 AM
Modified
Nov 9, 2026, 7:16 PM
Severity
Moderate
Public date
Nov 3, 2026, 11:40 PM