π¨ [security] Update express 4.17.1 β 4.21.2 (minor)
π¨ Your current dependencies have known security vulnerabilities π¨
This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!
Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.
What changed?
β³οΈ express (4.17.1 β 4.21.2) Β· Repo Β· Changelog
Security Advisories π¨
π¨ express vulnerable to XSS via response.redirect()
Impact
In express <4.20.0, passing untrusted user input - even after sanitizing it - to
response.redirect()may execute untrusted codePatches
this issue is patched in express 4.20.0
Workarounds
users are encouraged to upgrade to the patched version of express, but otherwise can workaround this issue by making sure any untrusted inputs are safe, ideally by validating them against an explicit allowlist
Details
successful exploitation of this vector requires the following:
- The attacker MUST control the input to response.redirect()
- express MUST NOT redirect before the template appears
- the browser MUST NOT complete redirection before:
- the user MUST click on the link in the template
π¨ Express.js Open Redirect in malformed URLs
Impact
Versions of Express.js prior to 4.19.2 and pre-release alpha and beta versions before 5.0.0-beta.3 are affected by an open redirect vulnerability using malformed URLs.
When a user of Express performs a redirect using a user-provided URL Express performs an encode using
encodeurlon the contents before passing it to thelocationheader. This can cause malformed URLs to be evaluated in unexpected ways by common redirect allow list implementations in Express applications, leading to an Open Redirect via bypass of a properly implemented allow list.The main method impacted is
res.location()but this is also called from withinres.redirect().Patches
An initial fix went out with
express@4.19.0, we then patched a feature regression in4.19.1and added improved handling for the bypass in4.19.2.Workarounds
The fix for this involves pre-parsing the url string with either
require('node:url').parseornew URL. These are steps you can take on your own before passing the user input string tores.locationorres.redirect.References
#5539
koajs/koa#1800
https://expressjs.com/en/4x/api.html#res.location
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ accepts (indirect, 1.3.7 β 1.3.8) Β· Repo Β· Changelog
Release Notes
1.3.8
- deps: mime-types@~2.1.34
- deps: mime-db@~1.51.0
- deps: negotiator@0.6.3
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 28 commits:
1.3.8build: mocha@9.2.0build: support Node.js 17.xbuild: Node.js@14.19build: eslint-plugin-markdown@2.2.1build: mocha@8.4.0deps: negotiator@0.6.3deps: mime-types@~2.1.34build: support Node.js 16.xbuild: support Node.js 15.xtests: fix deep equal checksbuild: eslint@7.32.0lint: apply standard 14 stylebuild: eslint-plugin-standard@4.1.0build: eslint-plugin-import@2.25.4build: mocha@7.2.0build: nyc@15.1.0build: eslint-plugin-markdown@1.0.2lint: apply standard 13 stylebuild: nyc@14.1.1build: mocha@6.2.3build: support Node.js 14.xbuild: support Node.js 13.xbuild: Node.js@12.22build: Node.js@11.15build: Node.js@10.24build: Node.js@8.17build: use GitHub Actions instead of Travis CI
βοΈ body-parser (indirect, 1.19.0 β 1.20.3) Β· Repo Β· Changelog
Security Advisories π¨
π¨ body-parser vulnerable to denial of service when url encoding is enabled
Impact
body-parser <1.20.3 is vulnerable to denial of service when url encoding is enabled. A malicious actor using a specially crafted payload could flood the server with a large number of requests, resulting in denial of service.
Patches
this issue is patched in 1.20.3
References
Release Notes
1.20.3
What's Changed
Important
- deps: qs@6.13.0
- add
depthoption to customize the depth level in the parser- IMPORTANT: The default
depthlevel for parsing URL-encoded data is now32(previously wasInfinity). DocumentationOther changes
- chore: add support for OSSF scorecard reporting by @inigomarquinez in #522
- ci: fix errors in ci github action for node 8 and 9 by @inigomarquinez in #523
- fix: pin to node@22.4.1 by @wesleytodd in #527
- deps: qs@6.12.3 by @melikhov-dev in #521
- Add OSSF Scorecard badge by @bjohansebas in #531
- Linter by @UlisesGascon in #534
- Release: 1.20.3 by @UlisesGascon in #535
New Contributors
- @inigomarquinez made their first contribution in #522
- @melikhov-dev made their first contribution in #521
- @bjohansebas made their first contribution in #531
- @UlisesGascon made their first contribution in #534
Full Changelog: 1.20.2...1.20.3
1.20.2
- Fix strict json error message on Node.js 19+
- deps: content-type@~1.0.5
- perf: skip value escaping when unnecessary
- deps: raw-body@2.5.2
1.20.1 (from changelog)
- deps: qs@6.11.0
- perf: remove unnecessary object clone
1.20.0
- Fix error message for json parse whitespace in
strict- Fix internal error when inflated body exceeds limit
- Prevent loss of async hooks context
- Prevent hanging when request already read
- deps: depd@2.0.0
- Replace internal
evalusage withFunctionconstructor- Use instance methods on
processto check for listeners- deps: http-errors@2.0.0
- deps: depd@2.0.0
- deps: statuses@2.0.1
- deps: on-finished@2.4.1
- deps: qs@6.10.3
- deps: raw-body@2.5.1
- deps: http-errors@2.0.0
1.19.2
- deps: bytes@3.1.2
- deps: qs@6.9.7
- Fix handling of
__proto__keys- deps: raw-body@2.4.3
- deps: bytes@3.1.2
1.19.1
- deps: bytes@3.1.1
- deps: http-errors@1.8.1
- deps: inherits@2.0.4
- deps: toidentifier@1.0.1
- deps: setprototypeof@1.2.0
- deps: qs@6.9.6
- deps: raw-body@2.4.2
- deps: bytes@3.1.1
- deps: http-errors@1.8.1
- deps: safe-buffer@5.2.1
- deps: type-is@~1.6.18
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ content-disposition (indirect, 0.5.3 β 0.5.4) Β· Repo Β· Changelog
Commits
See the full diff on Github. The new version differs by 27 commits:
0.5.4build: eslint-plugin-import@2.25.3build: eslint-plugin-promise@5.2.0tests: fix deep equal checkingbuild: support Node.js 17.xdeps: safe-buffer@5.2.1build: mocha@9.1.3build: eslint-plugin-standard@4.1.0build: eslint-plugin-markdown@2.2.1build: eslint-plugin-promise@5.1.1build: mocha@8.4.0build: support Node.js 16.xbuild: support Node.js 15.xbuild: eslint@7.32.0build: mocha@7.2.0build: support Node.js 14.xbuild: support Node.js 13.xbuild: Node.js@12.22build: Node.js@10.24lint: apply standard 13build: use GitHub Actions instead of Travis CIdocs: fix typo in commentbuild: mocha@6.2.3build: eslint@5.16.0build: Node.js@10.21build: support Node.js 12.xbuild: support Node.js 11.x
βοΈ content-type (indirect, 1.0.4 β 1.0.5) Β· Repo Β· Changelog
Release Notes
1.0.5
- perf: skip value escaping when unnecessary
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 74 commits:
1.0.5build: Node.js@10.24build: add version script for npm version releasesbuild: mocha@10.2.0build: eslint@8.32.0lint: apply standard 15 styleperf: skip value escaping when unnecessarytests: fix deep-equal assertionslint: remove deprecated String.prototype.substrbuild: support Node.js 19.xbuild: mocha@9.2.2build: eslint-plugin-promise@5.2.0build: eslint@7.32.0lint: apply standard 14 stylebuild: nyc@15.1.0build: Node.js@8.17build: Node.js@10.23build: mocha@8.4.0build: support Node.js 18.xbuild: support Node.js 17.xlint: apply standard 13 stylebuild: eslint-plugin-standard@4.1.0build: eslint-plugin-promise@4.2.1build: eslint-plugin-import@2.27.5build: support Node.js 16.xbuild: support Node.js 15.xbuild: mocha@7.2.0build: eslint@6.8.0build: nyc@14.1.1build: support Node.js 14.xbuild: support Node.js 13.xbuild: support Node.js 12.xbuild: eslint-plugin-import@2.26.0build: support Node.js 11.xbuild: eslint@5.16.0build: mocha@6.2.3build: use GitHub Actions instead of Travis CIbuild: use nyc for coverage testingbuild: speed up logic in Travis CI build stepsbuild: eslint-plugin-node@8.0.1build: eslint-plugin-import@2.16.0build: Node.js@10.15build: Node.js@8.15build: Node.js@6.16build: eslint-plugin-import@2.15.0build: eslint@5.12.1build: mocha@5.2.0build: restructure Travis CI build stepsbuild: migrate to Travis CI trusty imagebuild: Node.js@10.13build: Node.js@8.12lint: apply standard 12 styletests: use strict equalitytests: replace deprecated assert.deepEqual with deep-equaldocs: switch badges to badgenbuild: support Node.js 10.xbuild: Node.js@9.11build: eslint-plugin-standard@3.1.0build: eslint-plugin-import@2.14.0build: Node.js@8.11build: Node.js@6.14build: Node.js@4.9build: eslint-plugin-promise@3.8.0build: eslint-plugin-import@2.13.0build: eslint@4.19.1build: use yaml eslint configurationbuild: Node.js@9.9build: Node.js@8.10build: Node.js@6.13doc: fix some formattinglint: apply standard 10 stylebuild: support Node.js 9.xbuild: Node.js@8.9build: Node.js@6.12
βοΈ cookie (indirect, 0.4.0 β 0.7.1) Β· Repo Β· Changelog
Security Advisories π¨
π¨ 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", settinguserNamecookie to<script>and ignoringvalue.A similar escape can be used for
pathanddomain, 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
Release Notes
0.7.1
Fixed
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
maintopackage.jsonfor rspack (#166 by @proudparrot2)
0.6.0 (from changelog)
- Add
partitionedoption
0.5.0
- Add
priorityoption- Fix
expiresoption 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
0.4.1
- Fix
maxAgeoption to reject invalid values
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ depd (indirect, 1.1.2 β 2.0.0) Β· Repo Β· Changelog
Commits
See the full diff on Github. The new version differs by 28 commits:
Release v2.0.0build: Node.js@10.12tests: report coverage in child processesbuild: safe-buffer@5.1.2build: eslint@5.7.0build: mocha@5.2.0build: restructure Travis CI build stepslint: apply standard 12 styledocs: switch badges to badgendocs: fix typo in historytests: use strict equalitybuild: Node.js@10.10build: Node.js@8.12build: support Node.js 10.xbuild: Node.js@9.11lint: apply standard 11 stylebuild: Node.js@8.11build: Node.js@6.14build: Node.js@4.9lint: apply standard 10 styleUse instance methods on process to check for listenerstests: use safe-buffer to construct bufferstests: use Buffer.concat directlybuild: use yaml eslint configurationbuild: fix Node.js 0.8 npm install on appveyorReplace interal eval usage with Function constructorbuild: mocha@2.5.3Drop support for Node.js 0.6
βοΈ destroy (indirect, 1.0.4 β 1.2.0) Β· Repo Β· Changelog
Release Notes
1.2.0 (from changelog)
- Add
suppressargument
1.1.1 (from changelog)
- Work around Zlib close bug in Node.js < 4.5.5
1.1.0 (from changelog)
- Add Zlib steam support and Node.js leak work around
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ encodeurl (indirect, 1.0.2 β 2.0.0) Β· Repo Β· Changelog
Release Notes
2.0.0
Changed
Important: If you are using this to encode user entered and validated URLs, upgrade to v2 immediately. It is possible to exploit
\encoding in v1. A URL can be formed that looks likehttp://foo.com\@bar.com, which parses asfoo.comfor the host, but whenencodeUrl(url)will parse asbar.comfor the host.
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 21 commits:
2.0.0Use GitHub releasesUpdate README, add behavior expectationsAlign encoding with WHATWG URL spec (#8)fix: typos in README.md (#6)build: eslint@5.11.1build: Node.js@11.6build: Node.js@10.15build: Node.js@8.15build: Node.js@6.16build: use yaml eslint configurationlint: apply standard 12 styletests: use strict equalitybuild: support Node.js 11.xbuild: eslint-plugin-import@2.14.0build: support Node.js 10.xbuild: support Node.js 9.xbuild: Node.js@8.11build: Node.js@6.14build: Node.js@4.9lint: apply standard 11 style
βοΈ finalhandler (indirect, 1.1.2 β 1.3.1) Β· Repo Β· Changelog
Release Notes
1.2.1 (from changelog)
- Gracefully handle when handling an error and socket is null
1.2.0
- Remove set content headers that break response
- deps: on-finished@2.4.1
- deps: statuses@2.0.1
- Rename
425 Unordered Collectionto standard425 Too Early
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 72 commits:
1.3.1fix(deps): encodeurl@~2.0.01.3.0fix(ci): add 1.x branch to cifix: ignore status message for HTTP/2 (#53)1.2.1fix: gracefully handle when handling an error and socket is null (#57)fix(docs): fixed ci badge in readme.md (#52)ci: fix errors in ci github action for node 8 and 9 (#48)fix(tests): fixes for CI (#51)ci: add support for OSSF scorecard reporting (#47)build: Node.js@14.20build: Node.js@16.16build: supertest@6.2.4build: eslint-plugin-import@2.26.0build: Node.js@16.15build: Node.js@17.9build: mocha@10.0.01.2.0docs: update copyrightRemove set content headers that break responsetests: fix test case for 500 HEADtests: fix typo in test descriptionbuild: eslint-config-standard@14.1.1build: Node.js@17.7build: mocha@9.2.2build: Node.js@17.6docs: add security policydocs: add relevant change to historybuild: mocha@9.2.1deps: statuses@2.0.1deps: on-finished@2.4.1build: Node.js@16.14build: Node.js@17.5build: eslint-plugin-import@2.25.4build: mocha@9.2.0build: Node.js@17.4build: Node.js@14.19build: supertest@6.2.2build: mocha@9.1.4build: eslint-plugin-node@11.1.0build: support Node.js 17.xbuild: eslint-plugin-import@2.25.3build: eslint-plugin-promise@5.2.0build: use nyc for coverage testingbuild: Node.js@16.13build: mocha@9.1.3build: eslint-plugin-promise@5.1.0lint: apply standard 14 stylebuild: eslint-plugin-import@2.25.2build: support Node.js 16.xbuild: mocha@9.1.2build: eslint-plugin-markdown@2.2.1build: eslint@7.32.0build: eslint-plugin-standard@4.1.0build: eslint-plugin-node@9.2.0build: safe-buffer@5.2.1lint: apply standard 13 stylebuild: mocha@8.4.0build: support Node.js 15.xbuild: support Node.js 14.xbuild: support Node.js 13.xbuild: supertest@6.1.6build: eslint-plugin-promise@4.3.1build: mocha@7.2.0build: Node.js@10.24build: Node.js@12.22build: eslint-plugin-import@2.24.2build: mocha@6.2.3docs: clarify fn(err) after response startbuild: update CI for npm TLS upgradebuild: use GitHub Actions instead of Travis CI
βοΈ forwarded (indirect, 0.1.2 β 0.2.0) Β· Repo Β· Changelog
Release Notes
0.2.0
- Use
req.socketover deprecatedreq.connection
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ http-errors (indirect, 1.7.2 β 2.0.0) Β· Repo Β· Changelog
Release Notes
2.0.0 (from changelog)
- Drop support for Node.js 0.6
- Remove
I'mateapotexport; useImATeapotinstead- Remove support for status being non-first argument
- Rename
UnorderedCollectionconstructor toTooEarly- deps: depd@2.0.0
- Replace internal
evalusage withFunctionconstructor- Use instance methods on
processto check for listeners- deps: statuses@2.0.1
- Fix messaging casing of
418 I'm a Teapot- Remove code 306
- Rename
425 Unordered Collectionto standard425 Too Early
1.8.1 (from changelog)
- deps: toidentifier@1.0.1
1.8.0 (from changelog)
- Add
isHttpErrorexport to determine if value is an HTTP error- deps: setprototypeof@1.2.0
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ merge-descriptors (indirect, 1.0.1 β 1.0.3) Β· Repo Β· Changelog
Commits
See the full diff on Github. The new version differs by 34 commits:
1.0.3Update repo URLbuild: Node.js@10.15build: Node.js@8.15build: Node.js@6.16Fix typo in code commentbuild: run coverage reports on more versionsbuild: mocha@5.2.0build: restructure Travis CI build stepsbuild: use nyc for test coveragelint: apply standard 12 styletests: use strict equalitybuild: Node.js@10.13build: Node.js@8.12build: eslint-plugin-import@2.14.0build: Node.js@10.7build: use yaml eslint configurationbuild: support Node.js 10.xtests: fix throw assertslint: apply standard 11 styledocs: use module name as readme titledocs: document return valuebuild: Node.js@8.11build: Node.js@6.14build: Node.js@4.9build: support Node.js 9.xbuild: cache node_modules on Travis CIbuild: support Node.js 8.xbuild: support Node.js 7.xbuild: use precise dist for Travis CIbuild: support Node.js 6.xbuild: Node.js@5.12build: Node.js@4.8build: istanbul@0.4.5
βοΈ mime-db (indirect, 1.44.0 β 1.52.0) Β· Repo Β· Changelog
Release Notes
1.52.0
- Add extensions from IANA for more
image/*types- Add extension
.asctoapplication/pgp-keys- Add extensions to various XML types
- Add new upstream MIME types
1.51.0
- Add new upstream MIME types
- Mark
image/vnd.microsoft.iconas compressible- Mark
image/vnd.ms-ddsas compressible
1.50.0
- Add deprecated iWorks mime types and extensions
- Add new upstream MIME types
1.49.0
- Add extension
.trigtoapplication/trig- Add new upstream MIME types
1.48.0
- Add extension
.mvttoapplication/vnd.mapbox-vector-tile- Add new upstream MIME types
- Mark
text/yamlas compressible
1.47.0
- Add new upstream MIME types
- Remove ambigious extensions from IANA for
application/*+xmltypes- Update primary extension to
.esforapplication/ecmascript
1.46.0 (from changelog)
- Add extension
.amrtoaudio/amr- Add extension
.m4stovideo/iso.segment- Add extension
.opustoaudio/ogg- Add new upstream MIME types
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ mime-types (indirect, 2.1.27 β 2.1.35) Β· Repo Β· Changelog
Release Notes
2.1.35
- deps: mime-db@1.52.0
- Add extensions from IANA for more
image/*types- Add extension
.asctoapplication/pgp-keys- Add extensions to various XML types
- Add new upstream MIME types
2.1.34
- deps: mime-db@1.51.0
- Add new upstream MIME types
2.1.33
- deps: mime-db@1.50.0
- Add deprecated iWorks mime types and extensions
- Add new upstream MIME types
2.1.32
- deps: mime-db@1.49.0
- Add extension
.trigtoapplication/trig- Add new upstream MIME types
2.1.31
- deps: mime-db@1.48.0
- Add extension
.mvttoapplication/vnd.mapbox-vector-tile- Add new upstream MIME types
- Mark
text/yamlas compressible
2.1.30
- deps: mime-db@1.47.0
- Add extension
.amrtoaudio/amr- Remove ambigious extensions from IANA for
application/*+xmltypes- Update primary extension to
.esforapplication/ecmascript
2.1.29
- deps: mime-db@1.46.0
- Add extension
.amrtoaudio/amr- Add extension
.m4stovideo/iso.segment- Add extension
.opustoaudio/ogg- Add new upstream MIME types
2.1.28
- deps: mime-db@1.45.0
- Add
application/ubjsonwith extension.ubj- Add
image/avifwith extension.avif- Add
image/ktx2with extension.ktx2- Add extension
.dbftoapplication/vnd.dbf- Add extension
.rartoapplication/vnd.rar- Add extension
.tdtoapplication/urc-targetdesc+xml- Add new upstream MIME types
- Fix extension of
application/vnd.apple.keynoteto be.key
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ negotiator (indirect, 0.6.2 β 0.6.3) Β· Repo Β· Changelog
Release Notes
0.6.3 (from changelog)
- Revert "Lazy-load modules from main entry point"
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ on-finished (indirect, 2.3.0 β 2.4.1) Β· Repo Β· Changelog
Release Notes
2.4.1
- Fix error on early async hooks implementations
2.4.0
- Prevent loss of async hooks context
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ path-to-regexp (indirect, 0.1.7 β 0.1.12) Β· Repo Β· Changelog
Security Advisories π¨
π¨ Unpatched `path-to-regexp` ReDoS in 0.1.x
Impact
The regular expression that is vulnerable to backtracking can be generated in the 0.1.x release of
path-to-regexp, originally reported in CVE-2024-45296Patches
Upgrade to 0.1.12.
Workarounds
Avoid using two parameters within a single path segment, when the separator is not
.(e.g. no/:a-:b). Alternatively, you can define the regex used for both parameters and ensure they do not overlap to allow backtracking.References
π¨ path-to-regexp outputs backtracking regular expressions
Impact
A bad regular expression is generated any time you have two parameters within a single segment, separated by something that is not a period (
.). For example,/:a-:b.Patches
For users of 0.1, upgrade to
0.1.10. All other users should upgrade to8.0.0.These versions add backtrack protection when a custom regex pattern is not provided:
They do not protect against vulnerable user supplied capture groups. Protecting against explicit user patterns is out of scope for old versions and not considered a vulnerability.
Version 7.1.0 can enable
strict: trueand get an error when the regular expression might be bad.Version 8.0.0 removes the features that can cause a ReDoS.
Workarounds
All versions can be patched by providing a custom regular expression for parameters after the first in a single segment. As long as the custom regular expression does not match the text before the parameter, you will be safe. For example, change
/:a-:bto/:a-:b([^-/]+).If paths cannot be rewritten and versions cannot be upgraded, another alternative is to limit the URL length. For example, halving the attack string improves performance by 4x faster.
Details
Using
/:a-:bwill produce the regular expression/^\/([^\/]+?)-([^\/]+?)\/?$/. This can be exploited by a path such as/a${'-a'.repeat(8_000)}/a. OWASP has a good example of why this occurs, but the TL;DR is the/aat the end ensures this route would never match but due to naive backtracking it will still attempt every combination of the:a-:bon the repeated 8,000-a.Because JavaScript is single threaded and regex matching runs on the main thread, poor performance will block the event loop and can lead to a DoS. In local benchmarks, exploiting the unsafe regex will result in performance that is over 1000x worse than the safe regex. In a more realistic environment using Express v4 and 10 concurrent connections, this translated to average latency of ~600ms vs 1ms.
References
Release Notes
0.1.12
Fixed
- Improved backtracking protection for 0.1.x, will break some previously valid paths (see previous advisory: GHSA-9wv6-86v2-598j)
0.1.10
Fixed
- Add backtrack protection to parameters 29b96b4
- This will break some edge cases but should improve performance
0.1.9
Added
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 11 commits:
βοΈ proxy-addr (indirect, 2.0.6 β 2.0.7) Β· Repo Β· Changelog
Release Notes
2.0.7
- deps: forwarded@0.2.0
- Use
req.socketover deprecatedreq.connection
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 60 commits:
2.0.7build: use GitHub Actions instead of Travis CIdeps: forwarded@0.2.0build: eslint-plugin-import@2.23.4build: Node.js@15.14build: support Node.js 16.xbuild: eslint-plugin-markdown@2.2.0build: eslint@7.26.0build: eslint-plugin-import@2.23.2build: mocha@8.4.0build: eslint-plugin-markdown@2.1.0build: Node.js@14.17build: Node.js@12.22build: mocha@8.3.2build: eslint-plugin-markdown@2.0.1build: eslint@7.23.0build: Node.js@14.16build: Node.js@10.24build: Node.js@12.21build: Node.js@15.12build: eslint-plugin-markdown@2.0.0build: eslint-plugin-promise@4.3.1build: eslint@7.21.0build: mocha@8.3.1build: Node.js@15.5build: eslint@7.17.0build: eslint-plugin-import@2.22.1build: Node.js@12.20build: support Node.js 15.xbuild: eslint-plugin-standard@4.1.0build: eslint@7.14.0build: mocha@8.2.1build: Node.js@10.23build: Node.js@14.15build: eslint@7.8.1tests: use strict equality in deep equalsbuild: Node.js@14.10build: mocha@8.1.3build: eslint-plugin-import@2.22.0build: Node.js@10.22build: Node.js@14.7build: mocha@8.1.0build: Node.js@13.14build: eslint-plugin-import@2.21.2build: support Node.js 14.xbuild: mocha@8.0.1build: nyc@15.1.0build: mocha@7.2.0build: eslint-plugin-import@2.21.1build: Node.js@12.18build: Node.js@10.21build: nyc@15.0.1build: mocha@7.1.1build: Node.js@13.12build: eslint-plugin-node@11.1.0build: eslint-plugin-import@2.20.2build: eslint-config-standard@14.1.1build: mocha@7.1.0build: Node.js@13.10build: eslint-plugin-markdown@1.0.2
βοΈ qs (indirect, 6.7.0 β 6.13.0) Β· Repo Β· Changelog
Security Advisories π¨
π¨ qs vulnerable to Prototype Pollution
qs before 6.10.3 allows attackers to cause a Node process hang because an
__ proto__key can be used. In many typical web framework use cases, an unauthenticated remote attacker can place the attack payload in the query string of the URL that is used to visit the application, such asa[__proto__]=b&a[__proto__]&a[length]=100000000. The fix was backported to qs 6.9.7, 6.8.3, 6.7.3, 6.6.1, 6.5.3, 6.4.1, 6.3.3, and 6.2.4.
π¨ qs vulnerable to Prototype Pollution
qs before 6.10.3 allows attackers to cause a Node process hang because an
__ proto__key can be used. In many typical web framework use cases, an unauthenticated remote attacker can place the attack payload in the query string of the URL that is used to visit the application, such asa[__proto__]=b&a[__proto__]&a[length]=100000000. The fix was backported to qs 6.9.7, 6.8.3, 6.7.3, 6.6.1, 6.5.3, 6.4.1, 6.3.3, and 6.2.4.
π¨ qs vulnerable to Prototype Pollution
qs before 6.10.3 allows attackers to cause a Node process hang because an
__ proto__key can be used. In many typical web framework use cases, an unauthenticated remote attacker can place the attack payload in the query string of the URL that is used to visit the application, such asa[__proto__]=b&a[__proto__]&a[length]=100000000. The fix was backported to qs 6.9.7, 6.8.3, 6.7.3, 6.6.1, 6.5.3, 6.4.1, 6.3.3, and 6.2.4.
π¨ qs vulnerable to Prototype Pollution
qs before 6.10.3 allows attackers to cause a Node process hang because an
__ proto__key can be used. In many typical web framework use cases, an unauthenticated remote attacker can place the attack payload in the query string of the URL that is used to visit the application, such asa[__proto__]=b&a[__proto__]&a[length]=100000000. The fix was backported to qs 6.9.7, 6.8.3, 6.7.3, 6.6.1, 6.5.3, 6.4.1, 6.3.3, and 6.2.4.
Release Notes
Too many releases to show here. View the full release notes.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ raw-body (indirect, 2.4.0 β 2.5.2) Β· Repo Β· Changelog
Release Notes
2.5.2 (from changelog)
- Fix error message for non-stream argument
2.5.1 (from changelog)
- Fix error on early async hooks implementations
2.5.0 (from changelog)
- Prevent loss of async hooks context
- Prevent hanging when stream is not readable
- deps: http-errors@2.0.0
- deps: depd@2.0.0
- deps: statuses@2.0.1
2.4.3 (from changelog)
- deps: bytes@3.1.2
2.4.2 (from changelog)
- deps: bytes@3.1.1
- deps: http-errors@1.8.1
- deps: setprototypeof@1.2.0
- deps: toidentifier@1.0.1
2.4.1 (from changelog)
- deps: http-errors@1.7.3
- deps: inherits@2.0.4
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ send (indirect, 0.17.1 β 0.19.0) Β· Repo Β· Changelog
Security Advisories π¨
π¨ send vulnerable to template injection that can lead to XSS
Impact
passing untrusted user input - even after sanitizing it - to
SendStream.redirect()may execute untrusted codePatches
this issue is patched in send 0.19.0
Workarounds
users are encouraged to upgrade to the patched version of express, but otherwise can workaround this issue by making sure any untrusted inputs are safe, ideally by validating them against an explicit allowlist
Details
successful exploitation of this vector requires the following:
- The attacker MUST control the input to response.redirect()
- express MUST NOT redirect before the template appears
- the browser MUST NOT complete redirection before:
- the user MUST click on the link in the template
Release Notes
0.19.0
What's Changed
- Remove link renderization in html while redirecting (#235)
New Contributors
- @UlisesGascon made their first contribution in #235
Full Changelog: 0.18.0...0.19.0
0.18.0 (from changelog)
- Fix emitted 416 error missing headers property
- Limit the headers removed for 304 response
- deps: depd@2.0.0
- Replace internal
evalusage withFunctionconstructor- Use instance methods on
processto check for listeners- deps: destroy@1.2.0
- deps: http-errors@2.0.0
- deps: depd@2.0.0
- deps: statuses@2.0.1
- deps: on-finished@2.4.1
- deps: statuses@2.0.1
0.17.2 (from changelog)
- pref: ignore empty http tokens
- deps: http-errors@1.8.1
- deps: inherits@2.0.4
- deps: toidentifier@1.0.1
- deps: setprototypeof@1.2.0
- deps: ms@2.1.3
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 62 commits:
0.19.0Merge commit from fork0.18.0Limit the headers removed for 304 responsedocs: add security policydocs: fix linux build badge linkdocs: update copyrightdeps: destroy@1.2.0deps: on-finished@2.4.1build: Node.js@17.7build: mocha@9.2.2deps: statuses@2.0.1deps: depd@2.0.0deps: http-errors@2.0.0Fix emitted 416 error missing headers propertydeps: destroy@1.1.1build: Node.js@17.6build: mocha@9.2.1build: Node.js@17.5build: Node.js@16.14deps: destroy@1.1.0build: Node.js@14.19build: supertest@6.2.2build: mocha@9.2.0build: eslint-plugin-import@2.25.4build: Node.js@17.4build: fix run names in Github Actions0.17.2deps: http-errors@1.8.1pref: ignore empty http tokensdocs: fix typo in readmebuild: use nyc for coverage testingbuild: eslint-plugin-promise@5.2.0build: eslint-plugin-standard@4.1.0build: support Node.js 17.xbuild: supertest@6.1.6deps: ms@2.1.3build: eslint-plugin-markdown@2.2.1build: eslint-plugin-promise@5.1.1build: eslint-plugin-import@2.25.3build: ignore package-lockdeps: http-errors@~1.8.1build: mocha@8.1.3build: support Node.js 16.xbuild: eslint@7.32.0build: support Node.js 15.xbuild: mocha@8.4.0build: eslint-plugin-import@2.24.2build: support Node.js 14.xbuild: Node.js@12.22build: Node.js@10.24build: update CI for npm TLS upgradebuild: fix Node.js 13.x entrybuild: supertest@6.0.1build: mocha@7.2.0build: eslint-plugin-markdown@1.0.2build: support Node.js 13.xlint: apply standard 14 stylebuild: mocha@6.2.3build: Node.js@10.23build: Node.js@12.20build: use GitHub Actions instead of Travis CI
βοΈ serve-static (indirect, 1.14.1 β 1.16.2) Β· Repo Β· Changelog
Security Advisories π¨
π¨ serve-static vulnerable to template injection that can lead to XSS
Impact
passing untrusted user input - even after sanitizing it - to
redirect()may execute untrusted codePatches
this issue is patched in serve-static 1.16.0
Workarounds
users are encouraged to upgrade to the patched version of express, but otherwise can workaround this issue by making sure any untrusted inputs are safe, ideally by validating them against an explicit allowlist
Details
successful exploitation of this vector requires the following:
- The attacker MUST control the input to response.redirect()
- express MUST NOT redirect before the template appears
- the browser MUST NOT complete redirection before:
- the user MUST click on the link in the template
Release Notes
1.16.0
What's Changed
- Remove link renderization in html while redirecting (#173)
New Contributors
- @UlisesGascon made their first contribution in #173
Full Changelog: v1.15.0...1.16.0
1.15.0
- deps: send@0.18.0
- Fix emitted 416 error missing headers property
- Limit the headers removed for 304 response
- deps: depd@2.0.0
- deps: destroy@1.2.0
- deps: http-errors@2.0.0
- deps: on-finished@2.4.1
- deps: statuses@2.0.1
1.14.2
- deps: send@0.17.2
- deps: http-errors@1.8.1
- deps: ms@2.1.3
- pref: ignore empty http tokens
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by 48 commits:
1.16.2fix(deps): encodeurl@~2.0.01.16.1fix(deps): send@0.19.01.16.0Merge commit from fork1.15.0docs: update CI linkbuild: Node.js@17.8deps: send@0.18.0build: mocha@9.2.2build: Node.js@17.7build: supertest@6.2.2build: mocha@9.2.1build: Node.js@17.5build: Node.js@16.14build: Node.js@14.19build: mocha@9.2.0build: supertest@6.2.1build: Node.js@17.3build: eslint-plugin-import@2.25.4build: remove package-lock1.14.2tests: add tests for non-existent root pathdocs: fix a typo in the readmedeps: send@0.17.2build: eslint-plugin-promise@5.2.0build: use nyc for coverage testingbuild: support Node.js 17.xbuild: mocha@9.1.3build: safe-buffer@5.2.1build: mocha@8.4.0build: supertest@6.1.6build: eslint-plugin-standard@4.1.0lint: apply standard 14 stylebuild: eslint-plugin-markdown@2.2.1build: mocha@7.2.0build: support Node.js 16.xbuild: support Node.js 15.xbuild: support Node.js 14.xbuild: support Node.js 13.xbuild: Node.js@12.22build: mocha@6.2.3lint: apply standard 13 stylebuild: eslint-plugin-import@2.25.2build: Node.js@12.19build: Node.js@10.24build: use GitHub Actions instead of Travis CI
βοΈ setprototypeof (indirect, 1.1.1 β 1.2.0) Β· Repo
Commits
See the full diff on Github. The new version differs by 7 commits:
βοΈ statuses (indirect, 1.5.0 β 2.0.1) Β· Repo Β· Changelog
Release Notes
2.0.1 (from changelog)
- Fix returning values from
Object.prototype
2.0.0 (from changelog)
- Drop support for Node.js 0.6
- Fix messaging casing of
418 I'm a Teapot- Remove code 306
- Remove
status[code]exports; usestatus.message[code]- Remove
status[msg]exports; usestatus.code[msg]- Rename
425 Unordered Collectionto standard425 Too Early- Rename
STATUS_CODESexport tomessage- Return status message for
statuses(code)when given code
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.
βοΈ toidentifier (indirect, 1.0.0 β 1.0.1) Β· Repo Β· Changelog
Commits
See the full diff on Github. The new version differs by 40 commits:
1.0.1build: add version script for npm version releasespref: enable strict modedocs: add HISTORYbuild: mocha@9.1.3build: nyc@15.1.0build: mocha@8.4.0build: support Node.js 17.xbuild: eslint-plugin-import@2.25.3build: nyc@14.1.1build: eslint-plugin-promise@4.3.1build: mocha@7.2.0build: support Node.js 16.xbuild: eslint-plugin-markdown@2.2.1build: eslint@7.32.0build: mocha@6.2.3build: support Node.js 15.xbuild: nyc@13.3.0build: support Node.js 14.xbuild: eslint-plugin-markdown@1.0.2build: mocha@5.2.0build: support Node.js 13.xbuild: Node.js@12.22build: Node.js@10.24lint: apply standard 14build: mocha@3.5.3build: Node.js@8.17build: Node.js@6.17build: mocha@2.5.3build: eslint@6.8.0build: use GitHub Actions instead of Travis CIlint: apply standard 13 stylebuild: Node.js@12.8build: nyc@11.9.0lint: apply standard 12 stylebuild: support Node.js 12.xbuild: migrate to Travis CI trusty imagebuild: support Node.js 11.xbuild: Node.js@8.16build: Node.js@10.16