# CVE-2026-0933: OS Command Injection in `wrangler pages deploy`

> Attackers can execute arbitrary commands via the --commit-hash parameter in Wrangler pages deploy, primarily affecting CI/CD pipelines.

- **Severity:** High 7.7 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 Jan 2026
- **Updated:** 23 Jan 2026
- **Also known as:** GHSA-36p8-mvp6-cv38

## What is CVE-2026-0933?

CVE-2026-0933 is a high-severity command injection vulnerability in Cloudflare Wrangler, published on 20 Jan 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official 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.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2026-0933?

4 open source packages ship an affected version, including wrangler. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `wrangler` | npm | From 2.0.15 | 3.114.17 |
| `wrangler` | npm | From 2.0.15 | 3.114.17 |
| `wrangler` | npm | From 4.0.0 | 4.59.1 |
| `wrangler` | npm | From 4.0.0 | 4.59.1 |

Products: Cloudflare Wrangler.

## How do I fix CVE-2026-0933?

Upgrade wrangler to a fixed version for your release line: 3.114.17 or 4.59.1.

## Is CVE-2026-0933 being exploited?

There is no known exploitation of CVE-2026-0933 in the wild and no public exploit code.

## Other vulnerabilities in Cloudflare Wrangler

- [CVE-2023-7080](https://insights.sbomify.com/CVE-2023-7080/): Arbitrary remote code execution within wrangler dev Workers sandbox (high 8.5)
- [CVE-2023-7079](https://insights.sbomify.com/CVE-2023-7079/): Arbitrary remote file read in Wrangler dev server (medium 6.4)
- [CVE-2023-3348](https://insights.sbomify.com/CVE-2023-3348/): Directory traversal vulnerability in Cloudflare Wrangler (medium 5.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-0933 and fix it if it is affected.

What it is: CVE-2026-0933 is a high-severity command injection vulnerability in Cloudflare Wrangler, published on 20 Jan 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-0933 in the wild and no public exploit code.

Affected packages and fixed versions:
- wrangler (npm): affected from 2.0.15; fixed in 3.114.17
- wrangler (npm): affected from 2.0.15; fixed in 3.114.17
- wrangler (npm): affected from 4.0.0; fixed in 4.59.1
- wrangler (npm): affected from 4.0.0; fixed in 4.59.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-0933/ (Markdown: https://insights.sbomify.com/CVE-2026-0933/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-0933
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-0933
- OSV: https://osv.dev/vulnerability/CVE-2026-0933

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-0933/
Summaries are generated and may contain mistakes; the official description above is the record.
