CVE-2026-120639: CGI versions before 5.00 for Perl allow HTTP header injection via entity decoding after the newline check in header and unchecked values in multipart_start and do_push Stig Palmquist 03 Nov 2026 23:52 UTC

========================================================================
CVE-2026-120639                                      CPAN Security Group
========================================================================

        CVE ID:  CVE-2026-120639

  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 HTTP header injection via
entity decoding after the newline check in header and unchecked values
in multipart_start and do_push

Description
-----------
CGI versions before 5.00 for Perl allow HTTP header injection via
entity decoding after the newline check in header and unchecked values
in multipart_start and do_push.

With autoEscape off, header decodes HTML entities in extra header
values after its newline check, so an encoded CR or LF reaches the
response. multipart_start does not check header values for newlines,
and do_push does not check the type it prints in each part.

An application that passes request data into these header values can be
made to add headers or split the response.

Problem types
-------------
- CWE-113 Improper Neutralization of CRLF Sequences in HTTP Headers
  ('HTTP Request/Response Splitting')

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/69955309d371c8093d11cf12e3ddef491537ffad.patch
https://github.com/leejo/CGI.pm/commit/7733c2753f4f240012097507cda2b6e87ae46db4.patch