CVE-2026-120631: CGI::Cookie versions from 4.67 before 5.00 for Perl allow denial of service via the client cookie expires value used as a regex in parse Stig Palmquist 03 Nov 2026 23:44 UTC

========================================================================
CVE-2026-120631                                      CPAN Security Group
========================================================================

        CVE ID:  CVE-2026-120631

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

CGI::Cookie versions from 4.67 before 5.00 for Perl allow denial of
service via the client cookie expires value used as a regex in parse

Description
-----------
CGI::Cookie versions from 4.67 before 5.00 for Perl allow denial of
service via the client cookie expires value used as a regex in parse.

CGI's cookie method reads the Cookie request header through parse,
which interpolates the header's expires value unescaped into the
substitution pattern that removes it from the cookie string.

A client can make the request die with an invalid pattern, or tie up
the process with one that backtracks catastrophically.

Problem types
-------------
- CWE-1333 Inefficient Regular Expression Complexity
- CWE-625 Permissive Regular Expression

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

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