GHSA-m4vv-p6fq-jhqp Directory Traversal in @vivaxy/here

Not scored Published

An attacker can read arbitrary files outside the web root via directory traversal in the @vivaxy/here Node.js module.

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

What is GHSA-m4vv-p6fq-jhqp?

GHSA-m4vv-p6fq-jhqp is a path traversal vulnerability in @vivaxy/here, published on 1 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The @vivaxy/here module is a small web server that serves files with the process' working directory acting as the web root.

It is vulnerable to a directory traversal attack.

This means that files on the local file system which exist outside of the web root may be disclosed to an attacker. This might include confidential files.

Mitigating Factors: If the node process is run as a user with very limited filesystem permissions, there is significantly less risk of exposing confidential/private information.

Proof of Concept:

curl "http://${SERVER_IP}:${SERVER_PORT}/..%2f..%2fetc/passwd"

Recommendation

Run npm i @vivaxy/here to install the latest version that addresses this vulnerability.

Which versions are affected by GHSA-m4vv-p6fq-jhqp?

2 open source packages ship an affected version, including @vivaxy/here.

PackageAffectedFixed in
@vivaxy/here npmAll versions3.2.2
@vivaxy/here npmAll versions3.2.2

How do I fix GHSA-m4vv-p6fq-jhqp?

Upgrade @vivaxy/here to 3.2.2 or later.

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

Is GHSA-m4vv-p6fq-jhqp being exploited?

There is no known exploitation of GHSA-m4vv-p6fq-jhqp in the wild and no public exploit code.

Sources

Is GHSA-m4vv-p6fq-jhqp in your software?

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

Check your SBOMs for free