fix(deps): update dependency express to ~4.20.0 [security]#1993
fix(deps): update dependency express to ~4.20.0 [security]#1993renovate[bot] wants to merge 1 commit intodevelopfrom
Conversation
d4d6aa5 to
2ec6fac
Compare
e33c780 to
c6aac9e
Compare
c99e97e to
41e34cd
Compare
7d9e5b6 to
ef76c54
Compare
d2f2128 to
b561e10
Compare
64d328e to
6c9180b
Compare
c47821f to
8012d73
Compare
8012d73 to
bd46e62
Compare
bd46e62 to
a5833bb
Compare
a5833bb to
c3c2067
Compare
19d3f55 to
3714f15
Compare
5c724d2 to
6455e47
Compare
6e4b284 to
b352fb9
Compare
2f9ad68 to
d81befb
Compare
cd6b9de to
cd60f8b
Compare
327f9e3 to
4143ae1
Compare
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Comment |
| encodeurl "~1.0.2" | ||
| escape-html "~1.0.3" | ||
| parseurl "~1.3.3" | ||
| send "0.18.0" |
There was a problem hiding this comment.
There appears to be a dependency version inconsistency in the yarn.lock file. The serve-static@1.16.0 package is still referencing send@0.18.0, but the Express 4.20.0 update includes send@0.19.0. This mismatch could potentially prevent the security fixes from being fully applied or cause compatibility issues.
Consider running yarn install again after merging to ensure the dependency tree is properly resolved, or manually verify that the correct version of send is being used in the final build.
| send "0.18.0" | |
| send "0.19.0" |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
This PR contains the following updates:
~4.18.3→~4.20.0GitHub Vulnerability Alerts
CVE-2024-29041
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
expressjs/express@0867302
expressjs/express@0b74695
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.Resources
https://github.com/expressjs/express/pull/5539
https://github.com/koajs/koa/issues/1800
https://expressjs.com/en/4x/api.html#res.location
CVE-2024-43796
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:
Release Notes
expressjs/express (express)
v4.20.0Compare Source
==========
depthoption to customize the depth level in the parserdepthlevel for parsing URL-encoded data is now32(previously wasInfinity)res.redirect\,|, and^to align better with URL specoptions.maxAgeandoptions.expirestores.clearCookiev4.19.2Compare Source
==========
v4.19.1Compare Source
==========
v4.19.0Compare Source
==========
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.