---
id: "CVE-2026-120644"
kind: "vulnerability"
aliases: ["CVE-2026-120644"]
title: "Perl CGI::Cookie: unchecked path, domain and expires values allow cookie attribute injection"
severity: "low"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["cgi-cookie", "package", "perl", "web-apps"]
not_affected_if: ["hard-coded-cookie-attributes", "no-cgi-cookie"]
published_at: "2026-11-04T00:17:25+00:00"
first_seen_at: "2026-11-04T00:46:17+00:00"
updated_at: "2026-11-04T00:48:10+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120644", "first_seen_at": "2026-11-04T00:46:17+00:00"}]
---

# Perl CGI::Cookie: unchecked path, domain and expires values allow cookie attribute injection

CGI::Cookie before 5.00 writes path, domain and expires values into the Set-Cookie header without rejecting semicolons or control characters. An application that fills these values from request data can be tricked into adding other cookie attributes such as Domain or SameSite.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed CGI::Cookie version with `perl -MCGI::Cookie -e 'print $CGI::Cookie::VERSION'`.
- Search the codebase for calls that build cookies with `CGI::Cookie->new` where path, domain or expires come from request parameters.

## Fix

- CGI::Cookie `5.00` or later, per the linked patch; exact fixed release unknown beyond that.

## Timeline

- 2026-11-04T00:46:17+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120644

## Documents

- [fix] Patch: github.com https://github.com/leejo/CGI.pm/commit/0b3527faaa9de55f79ca7d59dd3bcfb2c5540e00.patch

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
