All versions of the package static-server are vulnerable to Directory Traversal due to improper input sanitization passed via the validPath function of server.js.
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Link | Tags |
---|---|
https://security.snyk.io/vuln/SNYK-JS-STATICSERVER-5722341 | third party advisory exploit |
https://gist.github.com/lirantal/1f7021703a2065ecaf9ec9e06a3a346d | third party advisory exploit |
https://github.com/nbluis/static-server/blob/master/server.js%23L218-L223 | product |