CVE-2017-16877 Next.js Directory Traversal Vulnerability

High 7.5 Published Updated

Attackers can exploit directory traversal in Next.js to access sensitive files via specific request namespaces.

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-16877?

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

Official description

ZEIT Next.js before 2.4.1 has directory traversal under the /_next and /static request namespace, allowing attackers to obtain sensitive information.

Weakness: CWE-22

Which versions are affected by CVE-2017-16877?

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

PackageAffectedFixed in
next npmFrom 1.0.02.4.1
next npmFrom 1.0.02.4.1

Products include Zeit Next.js.

How do I fix CVE-2017-16877?

Upgrade next to 2.4.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-16877 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2017-16877 exists.

Public exploit code: 1 Nuclei template.

Sources

Also known as GHSA-3f5c-4qxj-vmpf.

Is CVE-2017-16877 in your software?

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

Check your SBOMs for free