Open Redirect

Module: serve-static

Published: January 13th, 2015

Reported by: Pierre-√Člie Fauch√©



Vulnerable: <1.6.5 || >=1.7.0 <1.7.2
Patched: ~1.6.5 || >=1.7.2


When using serve-static middleware version < 1.7.2 and it's configured to mount at the root it creates an open redirect on the site.

For example: If a user visits they will be redirected to //, which some browsers interpret as


  • Update to version 1.7.2 or greater (or 1.6.5 if sticking to the 1.6.x line).
    • Disable redirects if not using the feature with 'redirect: false' option and cannot upgrade.


Sign up FREE for
nsp Continuous Security

Free for open source and the first private repo,
then just $1/mo per private repo