p PatchFirst

CVE-2024-29041

CVE-2024-29041 · Express.js Open Redirect in malformed URLs

This page contains facts from public vulnerability sources. Check the original advisory before updating.

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`](https://github.com/pillarjs/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.

CVSS 6.1 · Medium · EPSS 0.8% · Fix available

Published
Updated

Stack: system · node

Affected products and versions

  • express

    Versions
    • >=4.14.0, <4.19.0: Affected
    • >=5.0.0-alpha.1, <5.0.0-beta.3: Affected

    No fix published

  • node-express Debian:12

    Versions
    • 4.18.2+~4.17.14-1
    • 4.18.2+~cs8.34.50-1
    • 4.19.2+~cs8.36.21-1
    • 4.19.2+~cs8.36.26-1
    • 4.21.0+~cs8.36.26-1
    • 4.21.0+~cs8.36.26-2
    • 4.21.2+~cs8.36.27-1
    • 4.21.2+~cs8.36.27-2
    • 4.21.2+~cs8.36.27-3
    • 5.1.0+~cs12.3.3-1
    • 5.2.1+~cs12.3.9-1
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-express Debian:13

    Affected ranges
    • ECOSYSTEM: < 4.19.2+~cs8.36.21-1

    Update to 4.19.2+~cs8.36.21-1

  • node-express Debian:14

    Affected ranges
    • ECOSYSTEM: < 4.19.2+~cs8.36.21-1

    Update to 4.19.2+~cs8.36.21-1

  • express npm

    Affected ranges
    • SEMVER: < 4.19.2

    Update to 4.19.2

  • express npm

    Affected ranges
    • SEMVER: ≥ 5.0.0-alpha.1, < 5.0.0-beta.3

    Update to 5.0.0-beta.3

  • node-express Ubuntu:Pro:16.04:LTS

    Versions
    • 4.1.1~dfsg-1
    Affected ranges
    • ECOSYSTEM: < 4.1.1~dfsg-1ubuntu0.16.04.1~esm1

    Update to 4.1.1~dfsg-1ubuntu0.16.04.1~esm1

  • node-express Ubuntu:Pro:18.04:LTS

    Versions
    • 4.1.1~dfsg-1
    Affected ranges
    • ECOSYSTEM: < 4.1.1~dfsg-1ubuntu0.18.04.1~esm1

    Update to 4.1.1~dfsg-1ubuntu0.18.04.1~esm1

  • node-express Ubuntu:Pro:20.04:LTS

    Versions
    • 4.17.1-1
    • 4.17.1-2
    Affected ranges
    • ECOSYSTEM: < 4.17.1-2ubuntu0.1~esm1

    Update to 4.17.1-2ubuntu0.1~esm1

  • node-express Ubuntu:Pro:22.04:LTS

    Versions
    • 4.17.1-3
    • 4.17.1+~cs4.17.13-1
    • 4.17.2+~4.17.13-1
    • 4.17.3+~4.17.13-1
    Affected ranges
    • ECOSYSTEM: < 4.17.3+~4.17.13-1ubuntu0.1~esm1

    Update to 4.17.3+~4.17.13-1ubuntu0.1~esm1

Original sources

Check your server →