CVE-2026-120647: CGI versions before 5.00 for Perl allow Content-Disposition parameter injection via unescaped double quotes in the header attachment filename
Stig Palmquist 03 Nov 2026 23:59 UTC
========================================================================
CVE-2026-120647 CPAN Security Group
========================================================================
CVE ID: CVE-2026-120647
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 Content-Disposition parameter
injection via unescaped double quotes in the header attachment filename
Description
-----------
CGI versions before 5.00 for Perl allow Content-Disposition parameter
injection via unescaped double quotes in the header attachment
filename.
header(-attachment => $name) writes $name into the quoted filename
parameter of Content-Disposition without escaping double quotes.
An application that passes request data as the attachment name can be
made to send a second filename parameter, changing the name the
response is saved under.
Problem types
-------------
- CWE-116 Improper Encoding or Escaping of Output
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/131280a5c5bc51b65797bd57ef0ee8da8468065b.patch