CVE-2026-0933
JSON

7.7high

OS Command Injection in `wrangler pages deploy`

Severity
7.7high CVSS:4.0 by cloudflare
Exploit likelihood
1.51% (higher than 75% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
cloudflare
Also known as
GHSA-36p8-mvp6-cv38

Description

SummaryA command injection vulnerability (CWE-78) has been found to exist in the `wrangler pages deploy` command. The issue occurs because the `--commit-hash` parameter is passed directly to a shell command without proper validation or sanitization, allowing an attacker with control of `--commit-hash` to execute arbitrary commands on the system running Wrangler. Root causeThe commitHash variable, derived from user input via the --commit-hash CLI argument, is interpolated directly into a shell command using template literals (e.g.,  execSync(`git show -s --format=%B ${commitHash}`)). Shell metacharacters are interpreted by the shell, enabling command execution. ImpactThis vulnerability is generally hard to exploit, as it requires --commit-hash to be attacker controlled. The vulnerability primarily affects CI/CD environments where `wrangler pages deploy` is used in automated pipelines and the --commit-hash parameter is populated from external, potentially untrusted sources. An attacker could exploit this to: * Run any shell command. * Exfiltrate environment variables. * Compromise the CI runner to install backdoors or modify build artifacts. Credits Disclosed responsibly by kny4hacker. Mitigation * Wrangler v4 users are requested to upgrade to Wrangler v4.59.1 or higher. * Wrangler v3 users are requested to upgrade to Wrangler v3.114.17 or higher. * Users on Wrangler v2 (EOL) should upgrade to a supported major version.

Affected

Product or packageVersionsReported by
Wranglerfrom v3.0.0 up to v3.114.16, from v4.0.0 up to v4.59.0, v2.0.15+CVE List
wrangler (npm)from 2.0.15 before 3.114.17, from 4.0.0 before 4.59.1GitHub Advisory Database
cloudflare wranglerfrom 2.0.15 before 3.114.17, from 4.0.0 before 4.59.1NVD

All scores

cloudflare7.7high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:N
NVD9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-20CWE-78

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

SummaryA command injection vulnerability (CWE-78) has been found to exist in the `wrangler pages deploy` command. The issue occurs because the `--commit-hash` parameter is passed directly to a shell command without proper validation or sanitization, allowing an attacker with control of `--commit-hash` to execute arbitrary commands on the system running Wrangler. Root causeThe commitHash variable, derived from user input via the --commit-hash CLI argument, is interpolated directly into a shell command using template literals (e.g.,  execSync(`git show -s --format=%B ${commitHash}`)). Shell metacharacters are interpreted by the shell, enabling command execution. ImpactThis vulnerability is generally hard to exploit, as it requires --commit-hash to be attacker controlled. The vulnerability primarily affects CI/CD environments where `wrangler pages deploy` is used in automated pipelines and the --commit-hash parameter is populated from external, potentially untrusted sources. An attacker could exploit this to: * Run any shell command. * Exfiltrate environment variables. * Compromise the CI runner to install backdoors or modify build artifacts. Credits Disclosed responsibly by kny4hacker. Mitigation * Wrangler v4 users are requested to upgrade to Wrangler v4.59.1 or higher. * Wrangler v3 users are requested to upgrade to Wrangler v3.114.17 or higher. * Users on Wrangler v2 (EOL) should upgrade to a supported major version.

GitHub Advisory Database

Summary

A command injection vulnerability (CWE-78) has been found to exist in the wrangler pages deploy command. The issue occurs because the --commit-hash parameter is passed directly to a shell command without proper validation or sanitization, allowing an attacker with control of --commit-hash to execute arbitrary commands on the system running Wrangler.

Root cause

The commitHash variable, derived from user input via the --commit-hash CLI argument, is interpolated directly into a shell command using template literals (e.g., execSync(`git show -s --format=%B ${commitHash}`)). Shell metacharacters are interpreted by the shell, enabling command execution.

Impact

This vulnerability is generally hard to exploit, as it requires --commit-hash to be attacker controlled. The vulnerability primarily affects CI/CD environments where wrangler pages deploy is used in automated pipelines and the --commit-hash parameter is populated from external, potentially untrusted sources. An attacker could exploit this to:

  • Run any shell command.
  • Exfiltrate environment variables.
  • Compromise the CI runner to install backdoors or modify build artifacts.

Mitigation

  • Wrangler v4 users are requested to upgrade to Wrangler v4.59.1 or higher.
  • Wrangler v3 users are requested to upgrade to Wrangler v3.114.17 or higher.
  • Users on Wrangler v2 (EOL) should upgrade to a supported major version.

Credits

Disclosed responsibly by kny4hacker.

NVD (es)

Resumen Se ha encontrado una vulnerabilidad de inyección de comandos (CWE-78) que existe en el comando 'wrangler pages deploy'. El problema ocurre porque el parámetro --commit-hash se pasa directamente a un comando de shell sin la validación o sanitización adecuadas, permitiendo a un atacante con control de --commit-hash ejecutar comandos arbitrarios en el sistema que ejecuta Wrangler. Causa raíz La variable commitHash, derivada de la entrada del usuario a través del argumento CLI --commit-hash, se interpola directamente en un comando de shell usando literales de plantilla (p. ej., execSync('git show -s --format=%B ${commitHash}')). Los metacaracteres de shell son interpretados por el shell, lo que permite la ejecución de comandos. Impacto Esta vulnerabilidad es generalmente difícil de exploit, ya que requiere que --commit-hash esté controlado por el atacante. La vulnerabilidad afecta principalmente a entornos CI/CD donde 'wrangler pages deploy' se utiliza en pipelines automatizados y el parámetro --commit-hash se rellena desde fuentes externas, potencialmente no confiables. Un atacante podría exploit esto para: * Ejecutar cualquier comando de shell. * Exfiltrar variables de entorno. * Comprometer el ejecutor de CI para instalar puertas traseras o modificar artefactos de compilación. Créditos Divulgado de forma responsable por kny4hacker. Mitigación * Se solicita a los usuarios de Wrangler v4 que actualicen a Wrangler v4.59.1 o superior. * Se solicita a los usuarios de Wrangler v3 que actualicen a Wrangler v3.114.17 o superior. * Los usuarios de Wrangler v2 (EOL) deben actualizar a una versión principal compatible.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-0933 changed 2026-01-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-36p8-mvp6-cv38 changed 2026-02-03CC-BY-4.0
NVDCVE-2026-0933 changed 2026-06-17Public domain