CVE-2018-3712 Directory Traversal in serve

Medium 6.5 Published Updated

A path traversal vulnerability in the serve Node.js module allows attackers to read arbitrary files from the server filesystem.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2018-3712?

CVE-2018-3712 is a medium-severity path traversal vulnerability in HackerOne serve node module, published on 7 Jun 2018. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

serve node module before 6.4.9 suffers from a Path Traversal vulnerability due to not handling %2e (.) and %2f (/) and allowing them in paths, which allows a malicious user to view the contents of any directory with known path.

Weakness: CWE-22

Which versions are affected by CVE-2018-3712?

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

PackageAffectedFixed in
serve npmAll versions6.4.9
serve npmAll versions6.4.9

Products include Zeit Serve.

How do I fix CVE-2018-3712?

Upgrade serve to 6.4.9 or later.

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

Is CVE-2018-3712 being exploited?

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

Sources

Also known as GHSA-q2qh-cgc2-qhr3.

Is CVE-2018-3712 in your software?

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

Check your SBOMs for free