// For flags

CVE-2023-7080

Arbitrary remote code execution within wrangler dev Workers sandbox

Severity Score

8.0
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

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 wrangler@3.19.0 and wrangler@2.20.2. Whilst wrangler dev's inspector server listens on local interfaces by default as of wrangler@3.16.0, 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 wrangler@3.18.0. wrangler@3.19.0 and wrangler@2.20.2 introduced validation for the Origin/Host headers.

V8 inspector permite intencionalmente la ejecución de código arbitrario dentro de la sandbox de Workers para su depuración. wrangler dev previamente iniciaría un servidor inspector escuchando en todas las interfaces de red. Esto permitiría a un atacante en la red local conectarse al inspector y ejecutar código arbitrario. Además, el servidor inspector no validó los encabezados Origin/Host, lo que le otorga a un atacante que puede engañar a cualquier usuario de la red local para que abra un sitio web malicioso la capacidad de ejecutar código. Si se usaba wrangler dev --remote, un atacante podría acceder a los recursos de producción si estuvieran vinculados al trabajador. Este problema se solucionó en wrangler@3.19.0 y wrangler@2.20.2. Si bien el servidor inspector de wrangler dev escucha en las interfaces locales de forma predeterminada a partir de wrangler@3.16.0, se ha detectado una vulnerabilidad SSRF en miniflare https://github.com/cloudflare/workers-sdk/security/advisories/GHSA-fwvg-2739-22v7 ( CVE-2023-7078) permitía el acceso desde la red local hasta wrangler@3.18.0. wrangler@3.19.0 y wrangler@2.20.2 introdujeron la validación para los encabezados Origen/Host.

*Credits: Peter Wu (Lekensteyn)
CVSS Scores
Attack Vector
Adjacent
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Adjacent
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2023-12-22 CVE Reserved
  • 2023-12-29 CVE Published
  • 2024-01-06 EPSS Updated
  • 2024-08-02 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-269: Improper Privilege Management
CAPEC
  • CAPEC-549: Local Execution of Code
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Cloudflare
Search vendor "Cloudflare"
Wrangler
Search vendor "Cloudflare" for product "Wrangler"
>= 2.0.0 < 2.20.2
Search vendor "Cloudflare" for product "Wrangler" and version " >= 2.0.0 < 2.20.2"
node.js
Affected
Cloudflare
Search vendor "Cloudflare"
Wrangler
Search vendor "Cloudflare" for product "Wrangler"
>= 3.0.0 < 3.19.0
Search vendor "Cloudflare" for product "Wrangler" and version " >= 3.0.0 < 3.19.0"
node.js
Affected