CVE-2021-23797 Directory Traversal

High 7.5 Published Updated

Attackers can read arbitrary files from the server if the --path-as-is option is enabled in http-server-node.

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

What is CVE-2021-23797?

CVE-2021-23797 is a high-severity path traversal vulnerability in http-server-node, published on 17 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

All versions of package http-server-node are vulnerable to Directory Traversal via use of --path-as-is.

Weakness: CWE-22

Which versions are affected by CVE-2021-23797?

2 open source packages ship an affected version, including http-server-node. It affects 1 product.

PackageAffectedFixed in
http-server-node npmAll versions to 1.0.2None
http-server-node npmAll versions to 1.0.2None

Products include Http-Server-Node Project Http-Server-Node.

How do I fix CVE-2021-23797?

No fix has been published for CVE-2021-23797 yet. Limit exposure of the affected software until one is available.

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

Is CVE-2021-23797 being exploited?

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

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-hj3m-v758-jwx5, UBUNTU-CVE-2021-23797.

Is CVE-2021-23797 in your software?

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

Check your SBOMs for free