ResponseCookie.render writes the cookie name, content, domain, path, and extension fields verbatim, with no sanitization of ; or control characters. An application that places attacker-controlled data into any of these fields lets the attacker inject additional cookie attributes (Domain=, Path=, SameSite=None, etc.) by embedding ; , widening a cookie's scope or downgrading its protections.
Cookie attribute injection: scope widening (Domain), SameSite downgrade, or overriding security-relevant attributes for applications that render attacker-influenced data in a ResponseCookie field. CR/LF in a field also threatens header splitting on backends that do not strip them.
ResponseCookie with attacker-influenced content, name, path, domain, or extension.Validate cookie field values against the RFC6265 grammar before constructing ResponseCookie, rejecting ; and control characters.
content, name, path, domain, and extension.content, name, path, and domain. Because extension is a single value, the semi-colon must be allowed as a delimiter, and sanitizing untrusted values remains the caller's responsibility.{
"cwe_ids": [
"CWE-113",
"CWE-1286"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-30T18:09:38Z",
"nvd_published_at": "2026-09-15T19:17:38Z",
"severity": "MODERATE"
}