CVE-2026-120641

CGI versions before 5.00 for Perl return upload filenames with any client-supplied path, including ../ and Windows paths

Published Nov 3, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
Description
CGI versions before 5.00 for Perl return upload filenames with any client-supplied path, including ../ and Windows paths.

The name returned for an uploaded file is the filename parameter of the part's Content-Disposition header, unchanged.

An application that saves the upload under this name can be made to write outside the intended directory.

Analysis

AI-generated

Technical impact

CGI.pm versions prior to 5.00 return the exact filename supplied by a client in a file upload request, including directory traversal characters such as "../" or Windows path separators; if an application stores the upload using this returned value, an attacker can write a file outside the intended directory, enabling arbitrary file creation or overwriting. The potential for configuration tampering or code deployment is inferred from the nature of the filesystem write but is not explicitly stated in the CVE description.

Affected Systems

Any Perl‑based web application that uses CGI.pm earlier than 5.00 to handle file uploads and stores the upload directly under the supplied filename is affected; this includes legacy scripts and custom applications that have not upgraded to newer CGI library releases and do not sanitize the filename parameter.

Risk and Exploitability

The vulnerability has a CVSS score of 8.8, an EPSS score of < 1%, and is not listed in the CISA KEV catalog. It permits direct filesystem manipulation via a straightforward network‑based file upload attack vector. Based on the CVSS score and attack vector, the risk is high for affected systems, but this assessment is inferred from the provided metrics.

Remediation

Vendor Solution

Upgrade to CGI 5.00 or later.


Vendor Workaround

For deployments that cannot upgrade, do not use the client-supplied upload filename as a path.


OpenCVE Recommended Actions

  • Upgrade CGI.pm to version 5.00 or later.
  • If an upgrade is not possible, do not use the client‑supplied upload filename as a filesystem path; instead store the file in a predetermined, safe directory and generate a server‑side filename.
  • Sanitize or strip any directory traversal or path separator characters from the filename before using it to construct a filesystem path.

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

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
Metrics cvssV3_1

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

cvssV3_1

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

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Important

Type Values Removed Values Added
Description CGI versions before 5.00 for Perl return upload filenames with any client-supplied path, including ../ and Windows paths. The name returned for an uploaded file is the filename parameter of the part's Content-Disposition header, unchanged. An application that saves the upload under this name can be made to write outside the intended directory.
Title CGI versions before 5.00 for Perl return upload filenames with any client-supplied path, including ../ and Windows paths
Weaknesses CWE-22
References

Subscriptions

No data.

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Sources

Status
PUBLISHED
Assigner
CPANSec
Published
Updated
Nov 9, 2026, 7:16 PM
Reserved
Nov 2, 2026, 5:42 PM
Status
Deferred
Published
Nov 4, 2026, 12:17 AM
Modified
Nov 9, 2026, 8:18 PM
Severity
Important
Public date
Nov 3, 2026, 11:40 PM