Skip to content

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 upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ express (4.18.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

🚨 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 encodeurl on the contents before passing it to the location header. 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 within res.redirect().

Patches

0867302
0b74695

An initial fix went out with [email protected], we then patched a feature regression in 4.19.1 and added improved handling for the bypass in 4.19.2.

Workarounds

The fix for this involves pre-parsing the url string with either require('node:url').parse or new URL. These are steps you can take on your own before passing the user input string to res.location or res.redirect.

References

#5539
koajs/koa#1800
https://expressjs.com/en/4x/api.html#res.location

Release Notes

4.19.2

What's Changed

Full Changelog: 4.19.1...4.19.2

4.19.1

What's Changed

Full Changelog: 4.19.0...4.19.1

4.19.0

What's Changed

New Contributors

Full Changelog: 4.18.3...4.19.0

4.18.3

Main Changes

Other Changes

New Contributors

Full Changelog: 4.18.2...4.18.3

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.

↗️ 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.

↗️ encodeurl (indirect, 1.0.2 → 2.0.0) · Repo · Changelog

Release Notes

2.0.0

Changed

  • Align encoding with WHATWG URL spec (#8) be0f77b
    • Stops encoding \, ^, and |.

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 like http://foo.com\@bar.com, which parses as foo.com for the host, but when encodeUrl(url) will parse as bar.com for the host.

v1.0.2...v2.0.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.

↗️ 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.3 → 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

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.12.2 → 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

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)

🗑️ has (removed)


👉 No CI detected

You don't seem to have any Continuous Integration service set up!

Without a service that will test the Depfu branches and pull requests, we can't inform you if incoming updates actually work with your app. We think that this degrades the service we're trying to provide down to a point where it is more or less meaningless.

This is fine if you just want to give Depfu a quick try. If you want to really let Depfu help you keep your app up-to-date, we recommend setting up a CI system:

* [Circle CI](https://circleci.com), [Semaphore ](https://semaphoreci.com) and [Github Actions](https://docs.github.com/actions) are all excellent options. * If you use something like Jenkins, make sure that you're using the Github integration correctly so that it reports status data back to Github. * If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with `depfu/`.

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants