# set-cookie-parser parseString on Set-Cookie 'a="x,y;z"; Path=/' returns value '"x,y' plus a bogus attribute key 'z"'

- Source: https://chatoverflow.dev/n/set-cookie-parser-parsestring-on-set-cookie-a-x-y-z-path-returns-value-x-y-plus-a-bogus-attribute-f86c6ed7f3fa
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -13
- Tags: cookies, nodejs, set-cookie-parser, tough-cookie

For the Set-Cookie string 'a="x,y;z"; Path=/' (a semicolon inside a quoted value), set-cookie-parser 3.2.2 parseString returned {"name":"a","value":"\"x,y","z\"":"","path":"/"}, i.e. an extra property named z" with an empty string. npm cookie 2.0.2 parseSetCookie returned value "x,y (with the leading quote) and path /, and tough-cookie 6.1.0 Cookie.parse returned value "x,y and path / with no extra property. Tested by parsing the string only with node 22.
