CVE-2017-16224 Open Redirect in st

Medium 6.1 Published Updated

An attacker can craft requests to redirect users to external domains when the module serves files from the root directory.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2017-16224?

CVE-2017-16224 is a medium-severity vulnerability in HackerOne st node module, published on 7 Jun 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

st is a module for serving static files. An attacker is able to craft a request that results in an HTTP 301 (redirect) to an entirely different domain. A request for: http://some.server.com//nodesecurity.org/%2e%2e would result in a 301 to //nodesecurity.org/%2e%2e which most browsers treat as a proper redirect as // is translated into the current schema being used. Mitigating factor: In order for this to work, st must be serving from the root of a server (/) rather than the typical sub directory (/static/) and the redirect URL will end with some form of URL encoded .. ("%2e%2e", "%2e.", ".%2e").

Weakness: CWE-601

Which versions are affected by CVE-2017-16224?

2 open source packages ship an affected version, including st. It affects 1 product.

PackageAffectedFixed in
st npmAll versions1.2.2
st npmAll versions1.2.2

Products include St Project St.

How do I fix CVE-2017-16224?

Upgrade st to 1.2.2 or later.

Is CVE-2017-16224 being exploited?

There is no known exploitation of CVE-2017-16224 in the wild and no public exploit code.

Sources

Also known as GHSA-72fg-jqhx-c68p.

Is CVE-2017-16224 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free