Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

express vulnerable to XSS via response.redirect() #90

Open
1 task
PavelMor25 opened this issue Sep 22, 2024 · 0 comments
Open
1 task

express vulnerable to XSS via response.redirect() #90

PavelMor25 opened this issue Sep 22, 2024 · 0 comments

Comments

@PavelMor25
Copy link
Owner

Repositories:

Package: express

Description:

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

CVE ID: CVE-2024-43796

GHSA ID: GHSA-qw6h-vgh9-j6wx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant