CVE-2026-120648: CGI versions before 5.00 for Perl allow HTML injection via text containing --> in comment Stig Palmquist 04 Nov 2026 00:00 UTC

========================================================================
CVE-2026-120648                                      CPAN Security Group
========================================================================

        CVE ID:  CVE-2026-120648

  Distribution:  CGI
      Versions:  before 5.00
      MetaCPAN:  https://metacpan.org/dist/CGI
      VCS Repo:  https://github.com/leejo/CGI.pm

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

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.

Problem types
-------------
- CWE-79 Improper Neutralization of Input During Web Page Generation
  ('Cross-site Scripting')

Solutions
---------
Upgrade to CGI 5.00 or later.

References
----------
https://metacpan.org/release/LEEJO/CGI-4.72/source/lib/CGI.pm
https://metacpan.org/release/LEEJO/CGI-5.00/changes
https://github.com/leejo/CGI.pm/commit/6a17eb84703d84bca86b0079f5870ca9c921ffd4.patch