{"id":"CVE-2026-0933","aliases":["CVE-2026-0933","GHSA-36p8-mvp6-cv38"],"related":[],"kind":"vulnerability","state":"published","title":"OS Command Injection in `wrangler pages deploy`","summary":"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.\n\n\n\n\nRoot 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.\n\n\n\n\nImpactThis 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 \n\n--commit-hash parameter is populated from external, potentially untrusted sources. An attacker could exploit this to:\n\n  *  Run any shell command.\n  *  Exfiltrate environment variables.\n  *  Compromise the CI runner to install backdoors or modify build artifacts.\n\n\n\nCredits Disclosed responsibly by kny4hacker.\n\n\n\n\nMitigation\n  *  Wrangler v4 users are requested to upgrade to Wrangler v4.59.1 or higher.\n  *  Wrangler v3 users are requested to upgrade to Wrangler v3.114.17 or higher.\n  *  Users on Wrangler v2 (EOL) should upgrade to a supported major version.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.\n\n\n\n\nRoot 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.\n\n\n\n\nImpactThis 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 \n\n--commit-hash parameter is populated from external, potentially untrusted sources. An attacker could exploit this to:\n\n  *  Run any shell command.\n  *  Exfiltrate environment variables.\n  *  Compromise the CI runner to install backdoors or modify build artifacts.\n\n\n\nCredits Disclosed responsibly by kny4hacker.\n\n\n\n\nMitigation\n  *  Wrangler v4 users are requested to upgrade to Wrangler v4.59.1 or higher.\n  *  Wrangler v3 users are requested to upgrade to Wrangler v3.114.17 or higher.\n  *  Users on Wrangler v2 (EOL) should upgrade to a supported major version.","source":"cvelist"},{"lang":"en","text":"**Summary**\n\nA 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.\n\n**Root cause**\n\nThe `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.\n\n**Impact**\n\nThis 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:\n\n- Run any shell command.\n- Exfiltrate environment variables.\n- Compromise the CI runner to install backdoors or modify build artifacts.\n\n**Mitigation**\n\n- Wrangler v4 users are requested to upgrade to Wrangler v4.59.1 or higher. \n- Wrangler v3 users are requested to upgrade to Wrangler v3.114.17 or higher. \n- Users on Wrangler v2 (EOL) should upgrade to a supported major version.\n\n**Credits**\n\nDisclosed responsibly by kny4hacker.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Resumen\nSe 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.\n\nCausa raíz\nLa 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.\n\nImpacto\nEsta 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:\n\n  * Ejecutar cualquier comando de shell.\n  * Exfiltrar variables de entorno.\n  * Comprometer el ejecutor de CI para instalar puertas traseras o modificar artefactos de compilación.\n\nCréditos\nDivulgado de forma responsable por kny4hacker.\n\nMitigación\n  * Se solicita a los usuarios de Wrangler v4 que actualicen a Wrangler v4.59.1 o superior.\n  * Se solicita a los usuarios de Wrangler v3 que actualicen a Wrangler v3.114.17 o superior.\n  * Los usuarios de Wrangler v2 (EOL) deben actualizar a una versión principal compatible.","source":"nvd"}],"published":"2026-01-20T22:58:05.212Z","modified":"2026-06-17T10:11:39.087Z","severity":{"scorer":"cloudflare","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:N","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"cloudflare","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:N","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:L/SI:L/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"}],"cwes":["CWE-20","CWE-78"],"affected":[{"ranges":[{"type":"semver","introduced":"v3.0.0","lastAffected":"v3.114.16","status":"affected"},{"type":"semver","introduced":"v4.0.0","lastAffected":"v4.59.0","status":"affected"},{"version":"v2.0.15+","status":"affected"}],"vendor":"Cloudflare","product":"Wrangler","package":"Wrangler","repo":"https://github.com/cloudflare/workers-sdk","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.15","status":"affected","fixed":"3.114.17"}],"ecosystem":"npm","package":"wrangler","purl":"pkg:npm/wrangler","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.59.1"}],"ecosystem":"npm","package":"wrangler","purl":"pkg:npm/wrangler","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.0.15","fixed":"3.114.17"},{"status":"affected","introduced":"4.0.0","fixed":"4.59.1"}],"vendor":"cloudflare","product":"wrangler","cpe":"cpe:2.3:a:cloudflare:wrangler:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/cloudflare/workers-sdk","tags":["package","product"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/cloudflare/workers-sdk/security/advisories/GHSA-36p8-mvp6-cv38","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-0933","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/cloudflare/workers-sdk/commit/99b1f328a9afe181b49f1114ed47f15f6d25f0be","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%403.114.17","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.59.1","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"cloudflare","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-01-23T18:58:09.879Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-0933","url":"https://www.cve.org/CVERecord?id=CVE-2026-0933","licence":"CVE Terms of Use","modified":"2026-01-23T21:54:58.842Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-36p8-mvp6-cv38","url":"https://github.com/advisories/GHSA-36p8-mvp6-cv38","licence":"CC-BY-4.0","modified":"2026-02-03T03:10:47.584Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-0933","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-0933","licence":"Public domain","modified":"2026-06-17T10:11:39.087Z"}],"updatedAt":"2026-11-25T22:59:13.011Z","epss":{"score":0.01514,"percentile":0.75243,"date":"2026-12-01T12:00:22.000Z"}}