Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚨 [security] Update express 4.19.2 β†’ 4.20.0 (minor) #267

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Sep 10, 2024


🚨 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.19.2 β†’ 4.20.0) Β· 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 code

Patches

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:

  1. The attacker MUST control the input to response.redirect()
  2. express MUST NOT redirect before the template appears
  3. the browser MUST NOT complete redirection before:
  4. the user MUST click on the link in the template
Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ body-parser (indirect, 1.20.2 β†’ 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

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ call-bind (indirect, 1.0.2 β†’ 1.0.7) Β· Repo Β· Changelog

Release Notes

1.0.7 (from changelog)

Commits

  • [Refactor] use es-define-property 09b76a0
  • [Deps] update get-intrinsic, set-function-length ad5136d

1.0.6 (from changelog)

Commits

  • [Dev Deps] update aud, npmignore, tape d564d5c
  • [Deps] update get-intrinsic, set-function-length cfc2bdc
  • [Refactor] use es-errors, so things that only need those do not need get-intrinsic 64cd289
  • [meta] add missing engines.node 32a4038

1.0.5 (from changelog)

Commits

  • [Fix] throw an error on non-functions as early as possible f262408
  • [Deps] update set-function-length 3fff271

1.0.3 (from changelog)

Commits

  • [actions] reuse common workflows a994df6
  • [meta] use npmignore to autogenerate an npmignore file eef3ef2
  • [readme] flesh out content 1845ccf
  • [actions] use node/install instead of node/run; use codecov action 5b47d53
  • [Refactor] use set-function-length a0e165c
  • [Dev Deps] update @ljharb/eslint-config, aud, tape 9c50103
  • [meta] simplify "exports" 019c6d0
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, safe-publish-latest, tape 23bd718
  • [actions] update codecov uploader 62552d7
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, tape ec81665
  • [Dev Deps] update eslint, @ljharb/eslint-config, safe-publish-latest, tape 35d67fc
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, tape 0266d8d
  • [Dev Deps] update @ljharb/eslint-config, aud, tape 43a5b28
  • [Deps] update define-data-property, function-bind, get-intrinsic 780eb36
  • [Dev Deps] update aud, tape 90d50ad
  • [meta] use prepublishOnly script for npm 7+ 44c5433
  • [Deps] update get-intrinsic 86bfbfc
  • [Deps] update get-intrinsic 5c53354
  • [actions] update checkout action 4c393a8
  • [Deps] update get-intrinsic 4e70bde
  • [Deps] update get-intrinsic 55ae803

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.

↗️ function-bind (indirect, 1.1.1 β†’ 1.1.2) Β· Repo Β· Changelog

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ get-intrinsic (indirect, 1.1.1 β†’ 1.2.4) Β· Repo Β· Changelog

Release Notes

1.2.4 (from changelog)

Commits

  • [Refactor] use all 7 <+ ES6 Errors from es-errors bcac811

1.2.3 (from changelog)

Commits

  • [Refactor] use es-errors, so things that only need those do not need get-intrinsic f11db9c
  • [Dev Deps] update aud, es-abstract, mock-property, npmignore b7ac7d1
  • [meta] simplify exports faa0cc6
  • [meta] add missing engines.node 774dd0b
  • [Dev Deps] update tape 5828e8e
  • [Robustness] use null objects for lookups eb9a11f
  • [meta] add sideEffects flag 89bcc7a

1.2.2 (from changelog)

Commits

  • [Dev Deps] update @ljharb/eslint-config, aud, call-bind, es-abstract, mock-property, object-inspect, tape f51bcf2
  • [Refactor] use hasown instead of has 18d14b7
  • [Deps] update function-bind 6e109c8

1.2.1 (from changelog)

Commits

  • [Fix] avoid a crash in envs without __proto__ 7bad8d0
  • [Dev Deps] update es-abstract c60e6b7

1.2.0 (from changelog)

Commits

  • [actions] update checkout action ca6b12f
  • [Dev Deps] update @ljharb/eslint-config, es-abstract, object-inspect, tape 41a3727
  • [Fix] ensure Error.prototype is undeniable c511e97
  • [Dev Deps] update aud, es-abstract, tape 1bef8a8
  • [Dev Deps] update aud, es-abstract 0d41f16
  • [New] add BigInt64Array and BigUint64Array a6cca25
  • [Tests] use gopd ecf7722

1.1.3 (from changelog)

Commits

  • [Dev Deps] update es-abstract, es-value-fixtures, tape 07ff291
  • [Fix] properly check for % signs 50ac176

1.1.2 (from changelog)

Fixed

  • [Fix] properly validate against extra % signs #16

Commits

  • [actions] reuse common workflows 0972547
  • [meta] use npmignore to autogenerate an npmignore file 5ba0b51
  • [actions] use node/install instead of node/run; use codecov action c364492
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, es-abstract, object-inspect, tape dc04dad
  • [Dev Deps] update eslint, @ljharb/eslint-config, es-abstract, object-inspect, safe-publish-latest, tape 1c14059
  • [Tests] use mock-property b396ef0
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, object-inspect, tape c2c758d
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, es-abstract, es-value-fixtures, object-inspect, tape 29e3c09
  • [actions] update codecov uploader 8cbc141
  • [Dev Deps] update @ljharb/eslint-config, es-abstract, es-value-fixtures, object-inspect, tape 10b6f5c
  • [readme] add github actions/codecov badges 4e25400
  • [Tests] use for-each instead of foreach c05b957
  • [Dev Deps] update es-abstract 29b05ae
  • [meta] use prepublishOnly script for npm 7+ 95c285d
  • [Deps] update has-symbols 593cb4f
  • [readme] fix repo URLs 1c8305b
  • [Deps] update has-symbols c7138b6
  • [Dev Deps] remove unused has-bigints bd63aff

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.

↗️ has-symbols (indirect, 1.0.2 β†’ 1.0.3) Β· Repo Β· Changelog

Release Notes

1.0.3 (from changelog)

Commits

  • [actions] use node/install instead of node/run; use codecov action 518b28f
  • [meta] add bugs and homepage fields; reorder package.json c480b13
  • [actions] reuse common workflows 01d0ee0
  • [actions] update codecov uploader 6424ebe
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, tape dfa7e7f
  • [Dev Deps] update eslint, @ljharb/eslint-config, safe-publish-latest, tape 0c8d436
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, tape 9026554
  • [readme] add actions and codecov badges eaa9682
  • [Dev Deps] update eslint, tape bc7a3ba
  • [Dev Deps] update eslint, auto-changelog 0ace00a
  • [meta] use prepublishOnly script for npm 7+ 093f72b
  • [Tests] test on all 16 minors 9b80d3d

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 more commits than we can show here.

↗️ object-inspect (indirect, 1.11.0 β†’ 1.13.2) Β· Repo Β· Changelog

Release Notes

1.13.2 (from changelog)

Commits

  • [readme] update badges 8a51e6b
  • [Dev Deps] update @ljharb/eslint-config, tape ef05f58
  • [Dev Deps] update error-cause, has-tostringtag, tape c0c6c26
  • [Fix] Don't throw when global is not defined d4d0965
  • [meta] add missing engines.node 17a352a
  • [Dev Deps] update globalthis 9c08884
  • [Dev Deps] update error-cause 6af352d
  • [Dev Deps] update npmignore 94e617d
  • [Dev Deps] update mock-property 2ac24d7
  • [Dev Deps] update tape 46125e5

1.13.1 (from changelog)

Commits

  • [Fix] in IE 8, global can !== window despite them being prototypes of each other 30d0859

1.13.0 (from changelog)

Commits

  • [New] add special handling for the global object 431bab2
  • [Dev Deps] update @ljharb/eslint-config, aud, tape fd4f619
  • [Dev Deps] update mock-property, tape b453f6c
  • [Dev Deps] update error-cause e8ffc57
  • [Dev Deps] update tape 054b8b9
  • [Dev Deps] temporarily remove aud due to breaking change in transitive deps 2476845
  • [Dev Deps] pin glob, since v10.3.8+ requires a broken jackspeak 383fa5e
  • [Dev Deps] pin jackspeak since 2.1.2+ depends on npm aliases, which kill the install process in npm < 6 68c244c

1.12.3 (from changelog)

Commits

  • [Fix] in eg FF 24, collections lack forEach 75fc226
  • [actions] update rebase action to use reusable workflow 250a277
  • [Dev Deps] update aud, es-value-fixtures, tape 66a19b3
  • [Dev Deps] update @ljharb/eslint-config, aud, error-cause c43d332
  • [Tests] add @pkgjs/support to postlint e2618d2

1.12.2 (from changelog)

Commits

  • [Fix] use util.inspect for a custom inspection symbol method e243bf2
  • [meta] add support info ca20ba3
  • [Fix] ignore cause in node v16.9 and v16.10 where it has a bug 86aa553

1.12.1 (from changelog)

Commits

  • [Tests] use mock-property 4ec8893
  • [meta] use npmignore to autogenerate an npmignore file 07f868c
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, tape b05244b
  • [Dev Deps] update @ljharb/eslint-config, error-cause, es-value-fixtures, functions-have-names, tape d037398
  • [Fix] properly handle callable regexes in older engines 848fe48

1.12.0 (from changelog)

Commits

  • [New] add numericSeparator boolean option 2d2d537
  • [Robustness] cache more prototype methods 191533d
  • [New] ensure an Error’s cause is displayed 53bc2ce
  • [Dev Deps] update eslint, @ljharb/eslint-config bc164b6
  • [Robustness] cache RegExp.prototype.test a314ab8
  • [meta] fix auto-changelog settings 5ed0983

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.10) Β· Repo Β· Changelog

Security Advisories 🚨

🚨 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 to 8.0.0.

Version 0.1.10 adds backtracking protection when a custom regular expression is not provided, so it's still possible to manually create a ReDoS vulnerability if you are providing custom regular expressions.

Version 7.0.0 can enable strict: true and get an error when the regular expression might be bad.

Version 8.0.0 removes all features that can cause a ReDoS and stops exposing the regular expression directly.

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-:b to /: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-:b will 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 /a at the end ensures this route would never match but due to naive backtracking it will still attempt every combination of the :a-:b on 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.10

Fixed

  • Add backtrack protection to parameters 29b96b4
    • This will break some edge cases but should improve performance

v0.1.9...v0.1.10

0.1.9

Added

component/path-to-regexp@v0.1.8...v0.1.9

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.18.0 β†’ 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 code

Patches

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:

  1. The attacker MUST control the input to response.redirect()
  2. express MUST NOT redirect before the template appears
  3. the browser MUST NOT complete redirection before:
  4. the user MUST click on the link in the template
Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ serve-static (indirect, 1.15.0 β†’ 1.16.0) Β· 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 code

Patches

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:

  1. The attacker MUST control the input to response.redirect()
  2. express MUST NOT redirect before the template appears
  3. the browser MUST NOT complete redirection before:
  4. the user MUST click on the link in the template
Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ side-channel (indirect, 1.0.4 β†’ 1.0.6) Β· Repo Β· Changelog

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

πŸ†• define-data-property (added, 1.1.4)

πŸ†• es-define-property (added, 1.0.0)

πŸ†• es-errors (added, 1.3.0)

πŸ†• gopd (added, 1.0.1)

πŸ†• has-property-descriptors (added, 1.0.2)

πŸ†• has-proto (added, 1.0.3)

πŸ†• hasown (added, 2.0.2)

πŸ†• set-function-length (added, 1.2.2)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the dependencies Pull requests that update a dependency file label Sep 10, 2024
@depfu depfu bot merged commit 1787b90 into develop Sep 10, 2024
10 checks passed
@depfu depfu bot deleted the depfu/update/npm/express-4.20.0 branch September 10, 2024 20:14
@sebbo2002
Copy link
Owner

πŸŽ‰ This PR is included in version 6.0.0-develop.3 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

@sebbo2002
Copy link
Owner

πŸŽ‰ This PR is included in version 6.0.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file released on @next released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant