CVE-2026-120648

CGI versions before 5.00 for Perl allow HTML injection via text containing --> in comment

Published Nov 3, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
Description
CGI versions before 5.00 for Perl allow HTML injection via text containing --> in comment.

Arguments are placed between <!-- and --> without escaping, so text containing --> closes the comment early.

An application that passes request data to comment can be made to inject HTML into the page.

Analysis

AI-generated

Technical impact

The CGI library for Perl contains a flaw where unescaped text containing the sequence --> inside HTML comments allows an attacker to terminate a comment prematurely and inject arbitrary HTML into the rendered page. This injection enables cross‑site scripting attacks, potentially allowing malicious scripts, phishing, or other malicious content to be displayed to users who view the affected page.

Affected Systems

The vulnerability exists in CGI.pm versions prior to 5.00. Any Perl application that incorporates the CGI library below that version and accepts user input into comment sections of its output is affected.

Risk and Exploitability

A CVSS score of 6.1 and an unavailable EPSS score indicate a moderate likelihood of exploitation, while the straightforward path to inject malformed input keeps the XSS risk high. The vulnerability is not listed in CISA’s KEV catalog, and the lack of mitigation in affected applications still poses a significant risk to confidentiality and integrity of user sessions.

Remediation

Vendor Solution

Upgrade to CGI 5.00 or later.


OpenCVE Recommended Actions

  • Upgrade CGI.pm to version 5.00 or later as issued by the vendor.
  • If an upgrade is not feasible, sanitize all user‑supplied data that may enter HTML comments, ensuring that the sequence '-->' is either escaped or removed.
  • Implement review or strict input validation in the affected sections to prevent the injection of arbitrary markup.

Generated by OpenCVE AI on November 4, 2026 at 14:06 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 HTML injection via text containing --> in comment. Arguments are placed between <!-- and --> without escaping, so text containing --> closes the comment early. An application that passes request data to comment can be made to inject HTML into the page.
Title CGI versions before 5.00 for Perl allow HTML injection via text containing --> in comment
Weaknesses CWE-79
References

Subscriptions

No data.

Weaknesses
  • CWE-79

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

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Nov 9, 2026, 6:56 PM
Reserved
Nov 2, 2026, 5:46 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:41 PM