Skip to content

← Actionable
Medium, CVSS 6.1amended

Express.js Open Redirect in malformed URLs

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

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (express 5.0.0-beta.3, 4.19.2), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • npm express

    Affected
    < 4.19.2>= 5.0.0-alpha.1, < 5.0.0-beta.3
    Fixed in
    5.0.0-beta.3, 4.19.2

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
6.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
  • CVE-2024-29041: 0.79% estimated exploitation activity in the next 30 days; percentile 56.16 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

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 https://github.com/expressjs/express/commit/0867302ddbde0e9463d0564fea5861feb708c2dd https://github.com/expressjs/express/commit/0b746953c4bd8e377123527db11f9cd866e39f94 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…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-rv95-896h-c2vc

  2. Revision 1 · created ·

    Published from osv record GHSA-rv95-896h-c2vc

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2024-29041

Advisory: Express.js Open Redirect in malformed URLs
IDs: CVE-2024-29041, GHSA-rv95-896h-c2vc
Record: https://patchnext.com/advisories/cve-2024-29041 (revision 2, source checked 26 Oct 2026, 12:41 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.1)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: express 5.0.0-beta.3, 4.19.2. A vendor fix does not mean a deployment is fixed.

## Affected components
- npm express: affected < 4.19.2; >= 5.0.0-alpha.1, < 5.0.0-beta.3; fixed in 5.0.0-beta.3, 4.19.2

## Suggested inspection (read-only)
- `npm ls express --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on express.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-rv95-896h-c2vc (OSV record GHSA-rv95-896h-c2vc lists affected ranges: npm express >=0 =5.0.0-alpha.1 <5.0.0-beta.3 (fixed))
- Verified: https://github.com/advisories/GHSA-rv95-896h-c2vc (GitHub-reviewed advisory GHSA-rv95-896h-c2vc lists affected ranges: npm express >=0 =5.0.0-alpha.1 <5.0.0-beta.3)

Commands are suggestions: review each one before running it.

Loading voting…