Vulnerability name : Redirect handling depends on vulnerable Express redirect logic
Severity: Medium
Affected locations:
package.json:34
src/getRouter.js:87-89
Description
The SDK forwards addon-provided redirect targets directly into res.redirect(307, resp.redirect). The pinned express@4.16.3 release is affected by published advisories for:
- XSS via
response.redirect()
- Open redirect in malformed URLs
The sink is reachable whenever an addon handler returns a redirect value. In practice, exploitability depends on whether addon code derives that value from untrusted upstream or user-controlled input. This means the issue is conditional, but still security-relevant: the SDK ships a known-vulnerable redirect implementation and exposes it as part of its response handling path.
Steps to reproduce
- Clone the repository and run
npm install.
- Run
npm audit --json --omit=dev.
- Confirm that
express@4.16.3 is flagged for:
GHSA-qw6h-vgh9-j6wx
GHSA-rv95-896h-c2vc
- Create an addon handler that returns a redirect derived from external input.
- Request the affected route and verify that the SDK passes the value unchanged to
res.redirect().
- Validate behavior with the vendor advisory test cases for the affected Express version.
Proof of concept
Reachable sink in the SDK:
if (resp.redirect) {
res.redirect(307, resp.redirect)
return
}
Locally reported advisories:
express vulnerable to XSS via response.redirect()
https://github.com/advisories/GHSA-qw6h-vgh9-j6wx
Express.js Open Redirect in malformed URLs
https://github.com/advisories/GHSA-rv95-896h-c2vc
Security impact
- Open redirect if addons pass attacker-controlled redirect targets
- Client-side script execution risk in redirect-related browser flows on affected Express versions
- Phishing and trust-abuse opportunities if redirect values are sourced from untrusted inputs
impact
- Brand and trust damage from phishing-style redirects
- Support and incident handling costs
- Potential abuse of partner or affiliate traffic flows
Remediation
- Upgrade
express to >=4.21.2 or a newer supported release after compatibility testing
- Treat
resp.redirect as untrusted data and validate scheme, host, and normalization before redirecting
- Prefer an allowlist of redirect destinations where possible
- Reject malformed or non-HTTP(S) redirect targets
Vulnerability name : Redirect handling depends on vulnerable Express redirect logic
Severity: Medium
Affected locations:
package.json:34src/getRouter.js:87-89Description
The SDK forwards addon-provided redirect targets directly into
res.redirect(307, resp.redirect). The pinnedexpress@4.16.3release is affected by published advisories for:response.redirect()The sink is reachable whenever an addon handler returns a
redirectvalue. In practice, exploitability depends on whether addon code derives that value from untrusted upstream or user-controlled input. This means the issue is conditional, but still security-relevant: the SDK ships a known-vulnerable redirect implementation and exposes it as part of its response handling path.Steps to reproduce
npm install.npm audit --json --omit=dev.express@4.16.3is flagged for:GHSA-qw6h-vgh9-j6wxGHSA-rv95-896h-c2vcres.redirect().Proof of concept
Reachable sink in the SDK:
Locally reported advisories:
Security impact
impact
Remediation
expressto>=4.21.2or a newer supported release after compatibility testingresp.redirectas untrusted data and validate scheme, host, and normalization before redirecting