CVE-2026-0933

9.9 CRITICAL

📋 TL;DR

A command injection vulnerability in Wrangler's `pages deploy` command allows attackers who control the `--commit-hash` parameter to execute arbitrary shell commands. This primarily affects CI/CD environments where the parameter is populated from external sources. Successful exploitation could lead to complete compromise of the CI runner.

💻 Affected Systems

Products:
  • Cloudflare Wrangler
Versions: Wrangler v4 below 4.59.1, Wrangler v3 below 3.114.17, Wrangler v2 (all versions, EOL)
Operating Systems: All platforms where Wrangler runs
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when using `wrangler pages deploy` command with the `--commit-hash` parameter.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of CI/CD infrastructure, installation of persistent backdoors, exfiltration of sensitive data and credentials, and modification of build artifacts.

🟠

Likely Case

Limited command execution in CI environments where commit-hash values come from untrusted sources, potentially exposing environment variables and build secrets.

🟢

If Mitigated

No impact if proper input validation is implemented or if commit-hash values are controlled and validated.

🌐 Internet-Facing: LOW - The vulnerability requires access to CI/CD pipeline configuration or ability to modify commit-hash values.
🏢 Internal Only: MEDIUM - Internal CI/CD systems using Wrangler with untrusted commit-hash inputs are at risk.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires control over the --commit-hash parameter, typically through CI/CD pipeline manipulation or untrusted input sources.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Wrangler v4.59.1+ or v3.114.17+

Vendor Advisory: https://github.com/cloudflare/workers-sdk

Restart Required: No

Instructions:

1. Check current Wrangler version with `wrangler --version`. 2. For v4: upgrade to v4.59.1+ using `npm update -g wrangler`. 3. For v3: upgrade to v3.114.17+ using `npm update -g wrangler`. 4. For v2: migrate to supported v3 or v4 version.

🔧 Temporary Workarounds

Input validation wrapper

all

Create a wrapper script that validates commit-hash input before passing to wrangler

#!/bin/bash
# Validate commit hash contains only hex characters
if [[ ! $1 =~ ^[0-9a-f]+$ ]]; then
    echo "Invalid commit hash"
    exit 1
fi
wrangler pages deploy --commit-hash "$1"

🧯 If You Can't Patch

  • Remove or restrict use of --commit-hash parameter in CI/CD pipelines
  • Implement strict input validation for commit-hash values from external sources

🔍 How to Verify

Check if Vulnerable:

Check if using affected Wrangler version with `wrangler --version` and if using `pages deploy` with `--commit-hash` parameter.

Check Version:

wrangler --version

Verify Fix Applied:

Verify upgraded to patched version with `wrangler --version` and ensure version is v4.59.1+ or v3.114.17+.

📡 Detection & Monitoring

Log Indicators:

  • Unusual shell commands in CI/CD logs following wrangler pages deploy execution
  • Multiple failed wrangler deploy attempts with unusual commit-hash values

Network Indicators:

  • Unexpected outbound connections from CI runners following wrangler execution

SIEM Query:

process.name:"wrangler" AND command_line:"pages deploy" AND command_line:"--commit-hash"

🔗 References

📤 Share & Export