CVE-2017-16762 Sanic arbitrary file read and directory traversal

High 7.5 Published Updated

An attacker can read arbitrary files from the server via directory traversal in the Sanic web framework.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2017-16762?

CVE-2017-16762 is a high-severity path traversal vulnerability in n/a, published on 10 Nov 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Sanic before 0.5.1 allows reading arbitrary files with directory traversal, as demonstrated by the /static/..%2f substring.

Weakness: CWE-22

Which versions are affected by CVE-2017-16762?

3 open source packages ship an affected version, including sanic. It affects 1 product.

PackageAffectedFixed in
sanic PyPIAll versions0.5.1
sanic PyPIAll versions0.5.1
sanic PyPIAll versions0.5.1

Products include Sanic Project Sanic.

How do I fix CVE-2017-16762?

Upgrade sanic to 0.5.1 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2017-16762 being exploited?

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

Sources

Also known as GHSA-mpmf-hr8p-p49g, PYSEC-2017-40.

Is CVE-2017-16762 in your software?

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

Check your SBOMs for free