tough-cookie
6.1.0 · 6 Nov 2026BSD-3-Clause202.3M / weekRepositorynpmAtom feed
Upgrading tough-cookie From 3.0.1 to 6.1.0
14 releases in betweenevery note read
Reading releases, release notes and advisories…
Before you upgrade
Tick each one off as you go- Breaking6.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking4.0.0
- Breaking4.0.0
- Breaking4.0.0
Security
Fixes 1 advisory affecting 3.0.1
- tough-cookie Prototype Pollution vulnerabilitymoderate · GHSA-72xf-g2v4-qvf3
- 4.1.3
Security fix for Prototype Pollution discovery in #282.
Release by release
- New
New exported
PrefixSecurityModetype for theprefixSecurityoption (#659, #667).
- New
- Fixed
Avoid decoding URL authority part
- Fixed
6.0.1nothing new or fixed in the note
- Breaking
Localhost connections over
httpwill now be considered secure by default. For more information, see the README documentation and API Docs for how to configure this feature. - New
Add RFC 6761–compliant localhost loopback checks so secure cookies work on localhost (fixes: #382)
- New
Support publishing of both ESM and CJS
- Breaking
- Fixed
Fix regression bug in
domainMatch
- Fixed
5.1.1nothing new or fixed in the note
- Fixed
Remove cookies that expire at epoch time of
0 - Fixed
Restore missing
expiryDatemethod - Fixed
path-match: Avoid parsing path as regex
- Fixed
Fix npm token config for publish
- Fixed
- Breaking
We've migrated the project to TypeScript! First-party types are now available.
- Breaking
The minimum supported version of node is v18.
- Breaking
We no longer provide official support for non-node enviroments.
- Fixed
Fixed the expiry time not updating when a cookie is updating.
- Fixed
Fixed validation errors not getting called in some callbacks.
- Breaking
61 other lines we could not sort, mostly version bumps
- 6.1.0
__Host-cookies now need an explicitPath=/attribute. Having the default path come out as/is no longer enough (#608). - 6.1.0
Cookie.validate()now returnsfalsefor names that aren't valid HTTP tokens, such as empty names, names with separators or control characters, and non-ASCII names. Parsing and storage are unchanged (#650). - 6.1.0
An explicit
SameSite=Noneis now kept when serializing withCookie.toString()andgetSetCookieStrings(); it used to be dropped (#639). - 6.1.0
An IPv4 address in the
Domainattribute is now accepted instead of being treated as a public suffix (#630). - 6.1.0
The
getCookiesSync,getCookieString*,getSetCookieStrings*andsetCookieSyncmethods now accept aURLas well as astring, matching their async counterparts (#655). - 6.0.2
Review Section 5.1.3. Domain Matching
- 6.0.2
Dependency bumps in too many PRs to bother enumerating
- 6.0.1
Review Section 5.1.1. Dates
- 6.0.1
Adopt npm trusted publishing (OIDC)
- 6.0.1
Bump tldts from 7.0.23 to 7.0.25 in the production-dependencies group
12 internal lines (docs, tests, tooling) left out.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.