CVE-2023-7080 Arbitrary remote code execution within wrangler dev Workers sandbox

High 8.5 Published Updated

Attackers on the local network can execute arbitrary code in the wrangler dev sandbox due to an exposed V8 inspector server lacking proper header validation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2023-7080?

CVE-2023-7080 is a high-severity code injection vulnerability in Cloudflare wrangler, published on 29 Dec 2023. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

The V8 inspector intentionally allows arbitrary code execution within the Workers sandbox for debugging. wrangler dev would previously start an inspector server listening on all network interfaces. This would allow an attacker on the local network to connect to the inspector and run arbitrary code. Additionally, the inspector server did not validate Origin/Host headers, granting an attacker that can trick any user on the local network into opening a malicious website the ability to run code. If wrangler dev --remote was being used, an attacker could access production resources if they were bound to the worker.

This issue was fixed in [email protected] and [email protected]. Whilst wrangler dev's inspector server listens on local interfaces by default as of [email protected], an SSRF vulnerability in miniflare https://github.com/cloudflare/workers-sdk/security/advisories/GHSA-fwvg-2739-22v7  (CVE-2023-7078) allowed access from the local network until [email protected]. [email protected] and [email protected] introduced validation for the Origin/Host headers.

Weakness: CWE-269

Which versions are affected by CVE-2023-7080?

4 open source packages ship an affected version, including wrangler. It affects 1 product.

PackageAffectedFixed in
wrangler npmFrom 2.0.02.20.2
wrangler npmFrom 2.0.02.20.2
wrangler npmFrom 3.0.03.19.0
wrangler npmFrom 3.0.03.19.0

Products include Cloudflare Wrangler.

How do I fix CVE-2023-7080?

Upgrade wrangler to a fixed version for your release line: 2.20.2 or 3.19.0.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2023-7080 being exploited?

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

Sources

Also known as GHSA-f8mp-x433-5wpf.

Is CVE-2023-7080 in your software?

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

Check your SBOMs for free