Skip to content

Update dependency express to ^4.20.0 [SECURITY] (master)#96

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

Update dependency express to ^4.20.0 [SECURITY] (master)#96
renovatebot-confluentinc[bot] wants to merge 1 commit into
masterfrom
renovate/master-npm-express-vulnerability

Conversation

@renovatebot-confluentinc

@renovatebot-confluentinc renovatebot-confluentinc Bot commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

For any questions/concerns about this PR, please review the Renovate Bot wiki/FAQs, or the #renovatebot Slack channel.

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
express (source) ^4.21.1^4.20.0 age adoption passing 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).


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • ""
  • 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 has been generated by Mend Renovate.

@service-bot-app service-bot-app Bot marked this pull request as ready for review December 3, 2025 03:51
@service-bot-app service-bot-app Bot requested a review from a team as a code owner December 3, 2025 03:51
@service-bot-app

Copy link
Copy Markdown
Contributor

Could not automerge PR: CI checks have not passed

@renovatebot-confluentinc renovatebot-confluentinc Bot changed the title Update dependency express to v4.22.0 [SECURITY] (master) Update dependency express to v4.20.0 [SECURITY] (master) Dec 3, 2025
@renovatebot-confluentinc renovatebot-confluentinc Bot changed the title Update dependency express to v4.20.0 [SECURITY] (master) Update dependency express to ^4.20.0 [SECURITY] (master) Jan 29, 2026
@renovatebot-confluentinc renovatebot-confluentinc Bot force-pushed the renovate/master-npm-express-vulnerability branch from 877598c to a33f0be Compare May 3, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants