dependabot npm(deps): [security] bump cookie, express and cookie-parser
Bumps cookie, express and cookie-parser. These dependencies needed to be updated together.
Updates cookie
from 0.4.1 to 0.7.1 This update includes a security fix.
Vulnerabilities fixed
cookie accepts cookie name, path, and domain with out of bounds characters
Impact
The cookie name could be used to set other fields of the cookie, resulting in an unexpected cookie value. For example,
serialize("userName=<script>alert('XSS3')</script>; Max-Age=2592000; a", value)
would result in"userName=<script>alert('XSS3')</script>; Max-Age=2592000; a=test"
, settinguserName
cookie to<script>
and ignoringvalue
.A similar escape can be used for
path
anddomain
, which could be abused to alter other fields of the cookie.Patches
Upgrade to 0.7.0, which updates the validation for
name
,path
, anddomain
.Workarounds
Avoid passing untrusted or arbitrary values for these fields, ensure they are set by the application instead of user input.
References
Patched versions: 0.7.0
Affected versions: < 0.7.0
Release notes
Sourced from cookie's releases.
0.7.1
Fixed
- Allow leading dot for domain (#174)
- Although not permitted in the spec, some users expect this to work and user agents ignore the leading dot according to spec
- Add fast path for
serialize
without options, useobj.hasOwnProperty
when parsing (#172)https://github.com/jshttp/cookie/compare/v0.7.0...v0.7.1
0.7.0
- perf: parse cookies ~10% faster (#144 by
@kurtextrem
and #170)- fix: narrow the validation of cookies to match RFC6265 (#167 by
@bewinsnw
)- fix: add
main
topackage.json
for rspack (#166 by@proudparrot2
)https://github.com/jshttp/cookie/compare/v0.6.0...v0.7.0
0.6.0
- Add
partitioned
option0.5.0
- Add
priority
option- Fix
expires
option to reject invalid dates- pref: improve default decode speed
- pref: remove slow string split in parse
0.4.2
- pref: read value only when assigning in parse
- pref: remove unnecessary regexp in parse
Commits
-
cf4658f
0.7.1 -
6a8b8f5
Allow leading dot for domain (#174) -
58015c0
Remove more code and perf wins (#172) -
ab057d6
0.7.0 -
5f02ca8
Migrate history to GitHub releases -
a5d591c
Migrate history to GitHub releases -
51968f9
Skip isNaN -
9e7ca51
perf(parse): cache length, return early (#144) -
d6f39b0
Fix tests for old node -
6bb701f
Remove failing scorecard - Additional commits viewable in compare view
Maintainer changes
This version was pushed to npm by blakeembrey, a new releaser for cookie since your current version.
Updates express
from 4.21.0 to 4.21.1
Release notes
Sourced from express's releases.
4.21.1
What's Changed
- Backport a fix for CVE-2024-47764 to the 4.x branch by
@joshbuker
in expressjs/express#6029- Release: 4.21.1 by
@UlisesGascon
in expressjs/express#6031Full Changelog: https://github.com/expressjs/express/compare/4.21.0...4.21.1
Commits
-
8e229f9
4.21.1 -
a024c8a
fix(deps): cookie@0.7.1 - See full diff in compare view
Updates cookie-parser
from 1.4.6 to 1.4.7
Release notes
Sourced from cookie-parser's releases.
1.4.7
What's Changed
- chore: add support for OSSF scorecard reporting by
@inigomarquinez
in expressjs/cookie-parser#103- ci: fix errors in ci github action for node 8 and 9 by
@inigomarquinez
in expressjs/cookie-parser#104- ci: Use GITHUB_OUTPUT envvar instead of set-output command by
@arunsathiya
in expressjs/cookie-parser#100- deps: cookie@0.7.2 by
@SamChatfield
in expressjs/cookie-parser#116- Release: 1.4.7 by
@UlisesGascon
in expressjs/cookie-parser#117New Contributors
@inigomarquinez
made their first contribution in expressjs/cookie-parser#103@arunsathiya
made their first contribution in expressjs/cookie-parser#100@SamChatfield
made their first contribution in expressjs/cookie-parser#116@UlisesGascon
made their first contribution in expressjs/cookie-parser#117Full Changelog: https://github.com/expressjs/cookie-parser/compare/1.4.6...1.4.7
Changelog
Sourced from cookie-parser's changelog.
1.4.7 / 2024-10-08
- deps: cookie@0.7.2
- Fix object assignment of
hasOwnProperty
- deps: cookie@0.7.1
- Allow leading dot for domain
- Although not permitted in the spec, some users expect this to work and user agents ignore the leading dot according to spec
- Add fast path for
serialize
without options, useobj.hasOwnProperty
when parsing- deps: cookie@0.7.0
- perf: parse cookies ~10% faster
- fix: narrow the validation of cookies to match RFC6265
- fix: add
main
topackage.json
for rspack- deps: cookie@0.6.0
- Add
partitioned
option- deps: cookie@0.5.0
- Add
priority
option- Fix
expires
option to reject invalid dates- pref: improve default decode speed
- pref: remove slow string split in parse
- deps: cookie@0.4.2
- pref: read value only when assigning in parse
- pref: remove unnecessary regexp in parse
Commits
-
5d61e1e
1.4.7 -
ccf1f54
deps: cookie@0.7.2 (#116) -
429cfd4
ci: Use GITHUB_OUTPUT envvar instead of set-output command (#100) -
ca4c97e
ci: fix errors in ci pipeline for node 8 and 9 (#104) -
97bdf39
ci: add support for OSSF scorecard reporting (#103) -
e5862bd
build: Node.js@17.6 -
f0688d2
build: Node.js@14.19 -
44ec541
build: Node.js@16.14 -
695435a
deps: cookie@0.4.2 -
f66e7e1
build: mocha@9.2.1 - Additional commits viewable in compare view
Maintainer changes
This version was pushed to npm by ulisesgascon, a new releaser for cookie-parser since your current version.