CVE-2023-26111 node-static and @nubosoftware/node-static vulnerable to Directory Traversal

High 7.5 Published Updated

Attackers can read arbitrary files from the server due to improper path sanitization in the node-static library.

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-2023-26111?

CVE-2023-26111 is a high-severity path traversal vulnerability in @nubosoftware/node-static, published on 6 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

All versions of the package @nubosoftware/node-static; all versions of the package node-static are vulnerable to Directory Traversal due to improper file path sanitization in the startsWith() method in the servePath function.

Weakness: CWE-22

Which versions are affected by CVE-2023-26111?

4 open source packages ship an affected version, including @nubosoftware/node-static and node-static. It affects 2 products.

PackageAffectedFixed in
@nubosoftware/node-static npmAll versions to 0.7.11None
@nubosoftware/node-static npmAll versions to 0.7.11None
node-static npmAll versions to 0.7.11None
node-static npmAll versions to 0.7.11None

Products include \@Nubosoftware\/Node-Static Project \@Nubosoftware\/Node-Static, Node-Static Project Node-Static.

How do I fix CVE-2023-26111?

No fix has been published for CVE-2023-26111 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-2023-26111 being exploited?

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

Sources

Also known as GHSA-5g97-whc9-8g7j.

Is CVE-2023-26111 in your software?

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

Check your SBOMs for free