When processing a Set-Cookie from a response, the CookieJar client middleware trusts the server-supplied Domain attribute verbatim, with no check that it domain-matches the host that sent the cookie (RFC6265 ยง5.3 step 6) and no public suffix check. A malicious or compromised server can therefore plant a cookie for any domain in the cookie jar, which is subsequently set on the client's next request to that victim domain, enabling session fixation or overwriting security-relevant cookies.
Session fixation and overwrite of security-relevant cookies for arbitrary domains contacted by the same wrapped client.
CookieJar client middleware.CookieJar across trusted and untrusted targets.This middleware still does not implement public suffix rejection.
{
"cwe_ids": [
"CWE-384",
"CWE-565"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-15T20:00:43Z",
"nvd_published_at": null,
"severity": "MODERATE"
}