Skip to content

Update dependency express to v4.20.0 [SECURITY] - #354

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-express-vulnerability
Open

Update dependency express to v4.20.0 [SECURITY]#354
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-express-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Mar 26, 2024

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
express (source) 4.17.14.20.0 age confidence

Express.js Open Redirect in malformed URLs

CVE-2024-29041 / GHSA-rv95-896h-c2vc

More information

Details

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

expressjs/express@0867302
expressjs/express@0b74695

An initial fix went out with express@4.19.0, 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.

Resources

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

Severity

  • CVSS Score: 6.1 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


express vulnerable to XSS via response.redirect()

CVE-2024-43796 / GHSA-qw6h-vgh9-j6wx

More information

Details

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

Severity

  • CVSS Score: 2.3 / 10 (Low)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:L

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

expressjs/express (express)

v4.20.0

比较 Source

==========

  • deps: serve-static@​0.16.0
    • Remove link renderization in html while redirecting
  • deps: send@​0.19.0
    • Remove link renderization in html while redirecting
  • deps: body-parser@​0.6.0
    • add depth option to customize the depth level in the parser
    • IMPORTANT: The default depth level for parsing URL-encoded data is now 32 (previously was Infinity)
  • Remove link renderization in html while using res.redirect
  • deps: path-to-regexp@​0.1.10
    • Adds support for named matching groups in the routes using a regex
    • Adds backtracking protection to parameters without regexes defined
  • deps: encodeurl@~2.0.0
    • Removes encoding of \, |, and ^ to align better with URL spec
  • Deprecate passing options.maxAge and options.expires to res.clearCookie
    • Will be ignored in v5, clearCookie will set a cookie with an expires in the past to instruct clients to delete the cookie

v4.19.2

比较 Source

==========

  • Improved fix for open redirect allow list bypass

v4.19.1

比较 Source

==========

  • Allow passing non-strings to res.location with new encoding handling checks

v4.19.0

比较 Source

==========

  • Prevent open redirect allow list bypass due to encodeurl
  • deps: cookie@​0.6.0

v4.18.3

比较 Source

==========

  • Fix routing requests without method
  • deps: body-parser@​1.20.2
    • Fix strict json error message on Node.js 19+
    • deps: content-type@~1.0.5
    • deps: raw-body@​2.5.2
  • deps: cookie@​0.6.0
    • Add partitioned option

v4.18.2

比较 Source

===================

  • Fix regression routing a large stack in a single route
  • deps: body-parser@​1.20.1
    • deps: qs@​6.11.0
    • perf: remove unnecessary object clone
  • deps: qs@​6.11.0

v4.18.1

比较 Source

===================

  • Fix hanging on large stack of sync routes

v4.18.0

比较 Source

===================

  • Add "root" option to res.download
  • Allow options without filename in res.download
  • Deprecate string and non-integer arguments to res.status
  • Fix behavior of null/undefined as maxAge in res.cookie
  • Fix handling very large stacks of sync middleware
  • Ignore Object.prototype values in settings through app.set/app.get
  • Invoke default with same arguments as types in res.format
  • Support proper 205 responses using res.send
  • Use http-errors for res.format error
  • deps: body-parser@​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
    • deps: http-errors@​2.0.0
    • deps: on-finished@​2.4.1
    • deps: qs@​6.10.3
    • deps: raw-body@​2.5.1
  • deps: cookie@​0.5.0
    • Add priority option
    • Fix expires option to reject invalid dates
  • deps: depd@​2.0.0
    • Replace internal eval usage with Function constructor
    • Use instance methods on process to check for listeners
  • deps: finalhandler@​1.2.0
    • Remove set content headers that break response
    • deps: on-finished@​2.4.1
    • deps: statuses@​2.0.1
  • deps: on-finished@​2.4.1
    • Prevent loss of async hooks context
  • deps: qs@​6.10.3
  • 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
  • deps: serve-static@​1.15.0
    • deps: send@​0.18.0
  • deps: statuses@​2.0.1
    • Remove code 306
    • Rename 425 Unordered Collection to standard 425 Too Early

v4.17.3

比较 Source

===================

  • deps: accepts@~1.3.8
    • deps: mime-types@~2.1.34
    • deps: negotiator@​0.6.3
  • deps: body-parser@​1.19.2
    • deps: bytes@​3.1.2
    • deps: qs@​6.9.7
    • deps: raw-body@​2.4.3
  • deps: cookie@​0.4.2
  • deps: qs@​6.9.7
    • Fix handling of __proto__ keys
  • pref: remove unnecessary regexp for trust proxy

v4.17.2

比较 Source

===================

  • Fix handling of undefined in res.jsonp
  • Fix handling of undefined when "json escape" is enabled
  • Fix incorrect middleware execution with unanchored RegExps
  • Fix res.jsonp(obj, status) deprecation message
  • Fix typo in res.is JSDoc
  • deps: body-parser@​1.19.1
    • deps: bytes@​3.1.1
    • deps: http-errors@​1.8.1
    • deps: qs@​6.9.6
    • deps: raw-body@​2.4.2
    • deps: safe-buffer@​5.2.1
    • deps: type-is@~1.6.18
  • deps: content-disposition@​0.5.4
    • deps: safe-buffer@​5.2.1
  • deps: cookie@​0.4.1
    • Fix maxAge option to reject invalid values
  • deps: proxy-addr@~2.0.7
    • Use req.socket over deprecated req.connection
    • deps: forwarded@​0.2.0
    • deps: ipaddr.js@​1.9.1
  • deps: qs@​6.9.6
  • deps: safe-buffer@​5.2.1
  • deps: send@​0.17.2
    • deps: http-errors@​1.8.1
    • deps: ms@​2.1.3
    • pref: ignore empty http tokens
  • deps: serve-static@​1.14.2
    • deps: send@​0.17.2
  • deps: setprototypeof@​1.2.0

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from a52eb63 to 6c11f92 比较 April 5, 2024 21:56
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 6c11f92 to 011c68c 比较 August 3, 2024 10:58
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 011c68c to eea39b8 比较 September 3, 2024 11:34
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from eea39b8 to 221b140 比较 September 11, 2024 09:28
@renovate renovate Bot changed the title fix(deps): update dependency express to v4.19.2 [security] fix(deps): update dependency express to v4.20.0 [security] Sep 11, 2024
@renovate renovate Bot changed the title fix(deps): update dependency express to v4.20.0 [security] fix(deps): update dependency express to v4.20.0 [security] - autoclosed Dec 8, 2024
@renovate renovate Bot closed this Dec 8, 2024
@renovate
renovate Bot deleted the renovate/npm-express-vulnerability branch December 8, 2024 18:53
@renovate renovate Bot changed the title fix(deps): update dependency express to v4.20.0 [security] - autoclosed fix(deps): update dependency express to v4.20.0 [security] Dec 8, 2024
@renovate renovate Bot reopened this Dec 8, 2024
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch 2 times, most recently from 221b140 to aba6efe 比较 December 10, 2024 17:34
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch 2 times, most recently from 0b7392a to 046a348 比较 January 30, 2025 14:14
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 046a348 to c077048 比较 February 9, 2025 13:11
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from c077048 to 686091d 比较 March 3, 2025 17:46
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch 2 times, most recently from c9d32e0 to cfd518f 比较 March 13, 2025 20:18
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from cfd518f to 710a9e4 比较 April 1, 2025 10:40
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 710a9e4 to ea968bc 比较 April 8, 2025 11:20
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from ea968bc to 31e230b 比较 April 24, 2025 08:47
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 31e230b to 7e57d19 比较 May 2, 2025 21:49
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch 2 times, most recently from ad975a2 to 5f19de2 比较 May 16, 2025 20:12
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 5f19de2 to ebe8686 比较 May 19, 2025 15:10
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from ebe8686 to 01bd861 比较 May 28, 2025 15:10
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 01bd861 to 9ac36ba 比较 June 5, 2025 22:16
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 9ac36ba to 9f83975 比较 June 20, 2025 22:15
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 9f83975 to a8d04df 比较 July 2, 2025 13:50
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from a8d04df to 2b1cab0 比较 August 10, 2025 13:29
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 624565b to 66b2578 比较 February 12, 2026 11:27
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 66b2578 to 69d05d8 比较 February 20, 2026 18:49
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch 2 times, most recently from 477cdad to 5165a3e 比较 March 12, 2026 10:37
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 5165a3e to 5eb312a 比较 March 14, 2026 18:17
@renovate renovate Bot changed the title chore(deps): update dependency express to v4.20.0 [security] chore(deps): update dependency express to v4.20.0 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate renovate Bot changed the title chore(deps): update dependency express to v4.20.0 [security] - autoclosed chore(deps): update dependency express to v4.20.0 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch 2 times, most recently from 5eb312a to b66c2ba 比较 March 30, 2026 21:20
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from b66c2ba to 680838d 比较 April 8, 2026 20:55
@renovate renovate Bot changed the title chore(deps): update dependency express to v4.20.0 [security] chore(deps): update dependency express to v4.20.0 [security] - autoclosed Apr 27, 2026
@renovate renovate Bot closed this Apr 27, 2026
@renovate renovate Bot changed the title chore(deps): update dependency express to v4.20.0 [security] - autoclosed chore(deps): update dependency express to v4.20.0 [security] Apr 27, 2026
@renovate renovate Bot reopened this Apr 27, 2026
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch 2 times, most recently from 680838d to 95ed6f8 比较 April 27, 2026 23:28
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 95ed6f8 to 7086304 比较 May 6, 2026 14:33
@renovate renovate Bot changed the title chore(deps): update dependency express to v4.20.0 [security] Update dependency express to v4.20.0 [SECURITY] May 6, 2026
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch 2 times, most recently from dc30b29 to 3711a2e 比较 May 12, 2026 17:31
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 3711a2e to 4b079c5 比较 May 18, 2026 11:47
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch 2 times, most recently from e8b8603 to 0859fde 比较 June 1, 2026 23:14
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 0859fde to 1fbf924 比较 June 11, 2026 16:14
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch from 1fbf924 to e234f4a 比较 June 30, 2026 13:01
@renovate
renovate Bot force-pushed the renovate/npm-express-vulnerability branch 2 times, most recently from 6fe0992 to 80a9411 比较 July 18, 2026 17:10
注册 for free to join this conversation on GitHub. Already have an account? 登录 to comment

标签

None yet

项目

None yet

Development

Successfully merging this pull request may close these issues.

0 participants