CVE-2017-16224: Open Redirect in st
6.1
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.44225%
CWE
Published
8/6/2018
Updated
9/11/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
st | npm | <= 1.2.1 | 1.2.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from two key functions:
- getPath directly processed user-supplied paths using path.join() without sufficient validation for encoded traversals. The patch shows this was replaced with getUriPath containing improved regex checks (/(/|\|^)..?(/|\|$)/).
- serve initially parsed the URL path without validation. The patch shows it was modified to use getUriPath first. In vulnerable versions, these functions would appear in stack traces when processing malicious //domain/%2e%2e requests:
- serve() would handle the incoming request
- getPath() would process the untrusted path Together they allowed crafting Location headers with external domains due to insufficient path normalization and validation.