Safeguard
Vulnerability Analysis•

CVE-2026-0933: Command Injection in Cloudflare Wrangler

CVE-2026-0933 is a command injection in wrangler pages deploy. Upgrade Wrangler to 4.59.1 or 3.114.17, and never feed CI input to the commit hash option.

Safeguard Security Team
5 min read

CVE-2026-0933 is a command injection flaw in the wrangler pages deploy command of Cloudflare Wrangler. The commit hash option reaches a shell command unchecked. NVD scores it 9.9, critical, though Cloudflare calls it hard to exploit. Upgrade to Wrangler 4.59.1 or 3.114.17.

What's affected

Cloudflare lists the fix by major version:

  • Wrangler v4: upgrade to 4.59.1 or later.
  • Wrangler v3: upgrade to 3.114.17 or later.
  • Wrangler v2: end of life. Move to a supported major version.

The affected command is wrangler pages deploy, specifically the commit hash option. Wrangler is a developer tool, so the exposure is on laptops and, mostly, in CI/CD pipelines.

The record scores it 9.9, critical, with vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H. Cloudflare's own text adds a caveat: it is generally hard to exploit, because the attacker must control the commit hash value. The risk is in automated pipelines that fill that value from an external, possibly untrusted, source. The record lists the weakness as CWE-20, while the advisory text describes CWE-78. It is not on the CISA KEV list.

How to check if you're exposed

Check the installed version, locally and in CI.

npx wrangler --version
npm ls wrangler
# pnpm
pnpm why wrangler
# yarn
yarn why wrangler

Then find the places that call the affected command, and see where the commit hash value comes from.

grep -rn "pages deploy" .github .gitlab-ci.yml Jenkinsfile package.json 2>/dev/null
grep -rn "commit-hash" .github .gitlab-ci.yml Jenkinsfile package.json 2>/dev/null

If a pipeline sets the commit hash from something a contributor can influence, such as a pull request field, a branch name or a tag, it is the case the advisory warns about. If it is set from the checked-out repository revision by the CI system, the risk is much smaller, though you should still upgrade.

Also look at who can trigger the pipeline. A workflow that runs on pull requests from forks and holds deployment secrets deserves a second look regardless of this bug.

What to do now

  1. Upgrade Wrangler: to 4.59.1 or later on v4, or 3.114.17 or later on v3. Update lockfiles and any pinned versions in CI images.
  2. If you are on Wrangler v2, plan a move to a supported major version. Cloudflare does not list a fix for it.
  3. In every pipeline that calls wrangler pages deploy, make sure the commit hash comes from the CI system and not from user-controlled text.
  4. Do not pass untrusted values to shell commands in CI at all. Use the built in variables of your CI system for trusted fields, and validate anything else against a strict pattern first.
  5. Review the Cloudflare tokens in those pipelines. Scope them to the single project, and rotate any that ran on untrusted input.

Why it matters

The advisory states the root cause directly. The commit hash value, taken from the command line option of that name, is placed into a shell command through a template literal. A shell reads special characters in that text as instructions, so a value that contains them can run extra commands on the machine running Wrangler. The class is command injection, recorded as CWE-20 (improper input validation) in the CVE and described as CWE-78 (OS command injection) in the advisory text.

Cloudflare is candid about the limits. The attacker has to control the value, which is not normal for a developer typing on their own machine. The danger is in CI, where values come from events: a pull request title, a branch name, a tag. Pipelines that deploy previews for outside contributors fit that description. The advisory lists the consequences: running any shell command, exfiltrating environment variables, and compromising the runner to plant backdoors or alter build artifacts.

CI runners hold more than source code. They hold cloud tokens, signing keys and package registry credentials. A flaw in a build tool that runs inside such a job therefore reaches well beyond the project. That is the reason the CVSS scope is rated changed and why a 9.9 can sit beside a sentence that says hard to exploit: both are true, for different setups.

The durable lesson is to keep build tools current, like any dependency, and to treat every event field as untrusted text.

Try it yourself

The risky setup here is a pipeline that runs on pull requests and holds deploy secrets. This demo shows a policy gate that checks a change before it can run privileged steps.

Click through it at your own pace, or open it full screen.

Quick check

Am I affected if I only run Wrangler on my own laptop?

The attacker has to control the commit hash value, so the risk on a personal machine is low. Upgrade anyway, since the same version is often used in CI.

Which versions fix CVE-2026-0933?

Wrangler 4.59.1 or later on v4, and 3.114.17 or later on v3. Wrangler v2 is end of life.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.