CVE-2026-120638

CGI versions before 5.00 for Perl allow open redirects via HTML entity decoding of the URL after application validation in redirect

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 via HTML entity decoding of the URL after application validation in redirect.

redirect decodes HTML entities in its URL before writing the Location header, so a URL the application has already validated can change meaning. For example, /&#47;evil.example/ becomes //evil.example/ and sends the user to another host.

Analysis

AI-generated

Technical impact

CVE-2026-120638 describes an open redirect vulnerability in the Perl CGI module that is present in all versions prior to 5.00. The flaw arises because the redirect method first HTML‑entity decodes the supplied URL before writing the Location header, enabling an attacker to alter a previously validated URL. Consequently, a benign‑looking link such as "/&#47;evil.example/" is transformed into "//evil.example/", causing the client to be redirected to an arbitrary host. This flaw is categorized as a parameter tampering weakness (CWE‑180) and a URL‑redirection vulnerability (CWE‑601).

Affected Systems

The vulnerability affects the CGI.pm Perl library versions older than 5.00, which are commonly used in Perl web applications. Any deployment that relies on these earlier releases is subject to the open‑redirect behavior described above.

Risk and Exploitability

No EPSS score is reported for this issue, and it is not listed in the CISA KEV catalog, so the current exploitation likelihood is unclear. The CVSS score of 6.1 indicates a moderate severity. The likely attack vector involves manipulating the redirect function by embedding encoded characters in the URL that bypass application validation after HTML‑entity decoding. Nonetheless, open redirects are frequently leveraged in phishing and click‑jacking campaigns, making the risk of credential theft or malicious site redirection significant. Without additional publicly available exploitation data, administrators should treat the vulnerability as moderate to high severity, depending on the exposure of their redirect URLs.

Remediation

Vendor Solution

Upgrade to CGI 5.00 or later.


Vendor Workaround

For deployments that cannot upgrade, reject redirect URLs that HTML entity decoding would change.


OpenCVE Recommended Actions

  • Upgrade the Perl CGI module to version 5.00 or later.
  • If an upgrade is not immediately possible, configure the application to reject any redirect URLs that would change after HTML entity decoding.
  • As an additional safeguard, implement a whitelist or strict validation for redirect destinations to ensure only trusted hosts are allowed.

Generated by OpenCVE AI on November 4, 2026 at 13:41 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 via HTML entity decoding of the URL after application validation in redirect. redirect decodes HTML entities in its URL before writing the Location header, so a URL the application has already validated can change meaning. For example, /&#47;evil.example/ becomes //evil.example/ and sends the user to another host.
Title CGI versions before 5.00 for Perl allow open redirects via HTML entity decoding of the URL after application validation in redirect
Weaknesses CWE-180
CWE-601
References

Subscriptions

No data.

Weaknesses
  • CWE-180

    Incorrect Behavior Order: Validate Before Canonicalize

  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Nov 9, 2026, 6:50 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