Description
http-server through 14.1.1 contains an open redirect vulnerability in lib/core/index.js that builds the 302 Location header from the raw request pathname plus a slash. Unauthenticated attackers can craft protocol-relative paths with encoded traversal sequences resolving to an existing subdirectory, redirecting victims to attacker-controlled sites.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| adonisjs | http-server | 0 ≤14.1.1 | — |
References
- https://github.com/http-party/http-server/blob/v14.1.1/lib/core/index.js#L381-L390
- https://github.com/http-party/http-server/blob/v14.1.1/lib/core/index.js#L20-L35
- https://github.com/http-party/http-server/issues/982
- https://www.vulncheck.com/advisories/http-server-through-14.1.1-open-redirect-via-directory-trailing-slash-redirect