The `setCookie()` function fails to fully sanitize cookie attributes. Specifically, the domain value is not checked for semicolons and entries in the unparsed array are not sanitized. This allows attacker-influenced input to inject additional cookie attributes. For instance, a domain value containing a semicolon can append attributes like `SameSite`, and an unparsed entry can inject attributes such as `HttpOnly` without the caller's intent. Applications passing user-controlled input to these fields, such as reverse-proxy or multi-tenant servers scoping session cookies to tenant-supplied domains, may experience bypassed SameSite CSRF protections or have the `Secure`, `HttpOnly`, and `SameSite` attributes forced, stripped, or overridden.