CVE-2026-120644

CGI::Cookie versions before 5.00 for Perl allow cookie attribute injection via unvalidated path, domain and expires values

Published Nov 3, 2026 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
Description
CGI::Cookie versions before 5.00 for Perl allow cookie attribute injection via unvalidated path, domain and expires values.

The path, domain and expires values are written into the Set-Cookie header without checking for semicolons or control characters.

An application that sets them from request data can be made to add other cookie attributes, such as Domain or SameSite.

Analysis

AI-generated

Technical impact

The vulnerability in CGI::Cookie allows injection of arbitrary cookie attributes because the library writes the path, domain, and expires values directly into the Set‑Cookie header without validating for semicolons or control characters. This omission lets an attacker supply crafted values that add new attributes such as Domain or SameSite, potentially altering client‑side cookie behavior and subverting browser security controls.

Affected Systems

Perl applications that depend on CGI::Cookie versions earlier than 5.00 are affected. Any web application that uses this library and assigns the path, domain, or expires values from request data without prior sanitization can be exploited. The vendor notes the issue for the LEEJO/CGI library and provides a patch in the 5.00 release cycle.

Risk and Exploitability

The flaw does not provide remote code execution or privilege escalation; it only permits manipulation of cookie attributes. Exploitation requires the attacker to control the values sent to the cookie attributes, which is possible if the application reflects request data into these fields. The CVSS score is 9.1, the EPSS score is < 1%, and the vulnerability is not listed in CISA’s KEV, so the likelihood of exploitation is unknown but could be achieved with sufficient application misconfigurations.

Remediation

Vendor Solution

Upgrade to CGI 5.00 or later.


OpenCVE Recommended Actions

  • Upgrade CGI::Cookie to version 5.00 or newer.
  • Validate and sanitize user‑supplied path, domain, and expires values by rejecting semicolons or control characters before they are inserted into the Set‑Cookie header.
  • Replace direct usage of request parameters for cookie attributes with hard‑coded or server‑side validated values, enforcing a whitelist of acceptable attributes.

Generated by OpenCVE AI on November 9, 2026 at 23:00 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.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}

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::Cookie versions before 5.00 for Perl allow cookie attribute injection via unvalidated path, domain and expires values. The path, domain and expires values are written into the Set-Cookie header without checking for semicolons or control characters. An application that sets them from request data can be made to add other cookie attributes, such as Domain or SameSite.
Title CGI::Cookie versions before 5.00 for Perl allow cookie attribute injection via unvalidated path, domain and expires values
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:33 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
Moderate
Public date
Nov 3, 2026, 11:40 PM