CVE-2026-120647

CGI versions before 5.00 for Perl allow Content-Disposition parameter injection via unescaped double quotes in the header attachment filename

Published Nov 3, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

CGI.pm for Perl writes the value supplied to the attachment parameter into the quoted filename attribute of the Content‑Disposition header without escaping embedded double quotes. This flaw permits an attacker to inject an additional filename parameter, which causes browsers to treat the response as having a different or unexpected download name. The resulting impact is primarily confusion, phishing via renamed files, or brand‑damage, and it does not provide direct remote code execution.

Affected Systems

All versions of CGI.pm older than 5.00 – that is, the 4.x releases under the LEEJO/CGI CPAN namespace – are vulnerable. Any Perl application that uses these older libraries and passes user‑controlled data into the attachment name is affected.

Risk and Exploitability

The EPSS score of <1% indicates a very low probability of exploitation in the wild. The CVSS score of 9.8 reflects a high severity because an attacker who can inject a crafted HTTP request can hijack the download name and potentially trick users. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires only that an attacker can supply a malicious attachment name in an HTTP request; the attack vector is inferred to be a standard HTTP request injection.

Remediation

Vendor Solution

Upgrade to CGI 5.00 or later.


OpenCVE Recommended Actions

  • Upgrade to CGI 5.00 or later to eliminate the injection flaw.
  • If an immediate upgrade is not possible, modify the code that calls header(-attachment => $name) to escape or remove any double quotes from $name before passing it to the function.
  • Add input validation so that the attachment name cannot contain control characters such as double quotes; consider using CGI::escape or a similar sanitization routine.

Generated by OpenCVE AI on November 9, 2026 at 23:53 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N'}

cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Weaknesses CWE-140
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N'}

threat_severity

Moderate

Type Values Removed Values Added
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.
Title CGI versions before 5.00 for Perl allow Content-Disposition parameter injection via unescaped double quotes in the header attachment filename
Weaknesses CWE-116
References

Subscriptions

No data.

Weaknesses
  • CWE-116

    Improper Encoding or Escaping of Output

  • CWE-140

    Improper Neutralization of Delimiters

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Nov 9, 2026, 7:37 PM
Reserved
Nov 2, 2026, 5:45 PM
Status
Deferred
Published
Nov 4, 2026, 12:17 AM
Modified
Nov 9, 2026, 8:18 PM
Severity
Moderate
Public date
Nov 3, 2026, 11:41 PM