CVE-2023-39332 Path traversal in Node

Critical 9.8 Published Updated

Attackers can bypass path traversal protections in Node.js file system functions by using non-Buffer Uint8Array objects, potentially accessing unauthorized files.

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

What is CVE-2023-39332?

CVE-2023-39332 is a critical path traversal vulnerability in Fedoraproject Fedora, published on 18 Oct 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Various `node:fs` functions allow specifying paths as either strings or `Uint8Array` objects. In Node.js environments, the `Buffer` class extends the `Uint8Array` class. Node.js prevents path traversal through strings (see CVE-2023-30584) and `Buffer` objects (see CVE-2023-32004), but not through non-`Buffer` `Uint8Array` objects. This is distinct from CVE-2023-32004 which only referred to `Buffer` objects. However, the vulnerability follows the same pattern using `Uint8Array` instead of `Buffer`. Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.

Weakness: CWE-22

Which versions are affected by CVE-2023-39332?

2 open source packages ship an affected version, including node and node-min. It affects 2 products.

PackageAffectedFixed in
node BitnamiFrom 20.0.020.8.0
node-min BitnamiFrom 20.0.020.8.0

Products include Fedoraproject Fedora, Nodejs Node.js.

How do I fix CVE-2023-39332?

Upgrade node to 20.8.0 or later.

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

Is CVE-2023-39332 being exploited?

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

All Fedoraproject Fedora vulnerabilities

Sources

Also known as BIT-node-2023-39332, BIT-node-min-2023-39332, GHSA-9hm3-chgj-45rm.

Is CVE-2023-39332 in your software?

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

Check your SBOMs for free