Skip to main content
← All vulnerabilities
CVE-2024-29041GHSA-RV95-896H-C2VC

Express.js Open Redirect in malformed URLs

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 4.19.0, 5.0.0-beta.3, 4.19.2
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

Express.js minimalist web framework for node. Versions of Express.js prior to 4.19.0 and all pre-release alpha and beta versions of 5.0 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()`. The vulnerability is fixed in 4.19.2 and 5.0.0-beta.3.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • expressjs express

    From 4.14.0 · fixed in 4.19.0; From 5.0.0-alpha.1 · fixed in 5.0.0-beta.3

  • expressnpm

    fixed in 4.19.2

  • expressnpm

    From 5.0.0-alpha.1 · fixed in 5.0.0-beta.3

References 6

GitHub · expressjs/express

GitHub · koajs/koa

expressjs.com