CVE-2026-142189: http-server through 14.1.1 Open Redirect via Directory Trailing-Slash Redirect
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 Software
Event History
Frequently Asked Questions
Who can exploit this issue?
Any unauthenticated remote attacker can send a crafted request to an affected http-server instance. Exploitation requires a victim to follow the resulting redirect.
What conditions are required for a malicious redirect?
The crafted protocol-relative path must include encoded traversal sequences that resolve to an existing subdirectory. The vulnerable trailing-slash handling then builds a 302 Location header from the raw request pathname.
Are confidentiality, integrity, or availability impacts expected on the server itself?
The reported impact is limited to low confidentiality and low integrity impact, with no availability impact indicated. The primary risk is redirecting a victim to an attacker-controlled site.
How can I check whether an instance is affected?
Instances using npm/http-server through version 14.1.1 are within the stated affected range. Review whether directory requests trigger trailing-slash 302 redirects and whether the Location header reflects an unnormalized raw request pathname.