Junglewise Threat Intelligence

CVE-2023-7080: Cloudflare Wrangler arbitrary code execution in dev inspector

CVE-2023-7080 · Severity: low · CVSS 3.1 · Published 2024-01-03

Vendors: Cloudflare.

Executive brief

Wrangler is a developer tool used to build and test Cloudflare Workers serverless applications. The development server (`wrangler dev`) exposed a V8 debugging inspector on all network interfaces without proper access controls, allowing attackers on the local network or via malicious websites to execute arbitrary code within the Workers sandbox and potentially access production resources.

Technical details

The V8 inspector in `wrangler dev` intentionally allows arbitrary code execution for debugging purposes, but was exposed on all network interfaces without Origin/Host header validation. This enabled two attack vectors: (1) a direct network-based attack where an attacker on the same local network could connect directly to the inspector and execute code, and (2) a cross-origin attack where a user visiting a malicious website could be tricked into connecting to the inspector. When using `wrangler dev --remote`, this could grant attackers access to production resources bound to the worker. Patches were released in wrangler v3.19.0 and v2.20.2 with Origin/Host header validation; earlier mitigations included binding the inspector to localhost (v3.16.0) and SSRF vulnerability fixes in miniflare (v3.18.0).

Affected products

  • Cloudflare Wrangler >=2.0.0, <2.20.2 and >=3.0.0, <3.19.0

Timeline

  • 2023-12-29: disclosed
  • 2024-01-03: patched: wrangler v3.19.0 and v2.20.2 released with fixes

References