A critical command injection flaw in GitHub’s internal git pipeline let any authenticated user run arbitrary commands on backend servers with one standard git push.
Tracked as CVE-2026-3854 (CVSS 8.7), the bug affected GitHub.com and GitHub Enterprise Server (GHES). Wiz Research reported it on March 4, 2026, and disclosed it publicly on April 28, 2026.
The root cause is delimiter injection in the X-Stat header. This internal header carries security metadata as semicolon-delimited key=value pairs between services.
Hackers Could Exploit GitHub Flaw
The babeld proxy copied user-supplied git push option values into the header without neutralizing semicolons. An attacker could therefore break out of the push_option field and append forged fields. Downstream parsers use last-write-wins semantics, so the injected values overrode the legitimate ones.
The injected fields controlled the pre-receive hook binary. Wiz mapped several security-relevant fields, including rails_env, custom_hooks_dir, repo_pre_receive_hooks, large_blob_rejection_enabled, reject_sha_like_refs and user_operator_mode.
The gitrpcd service performs no authentication of its own and treats every X-Stat field as authoritative, which made the forged values trusted.
Escalation to remote code execution chained three injections. First, a non-production rails_env value pushed the hook runner out of its sandbox and into direct execution.

Second, a forged custom_hooks_dir redefined the base directory for hook script lookup. Third, a crafted repo_pre_receive_hooks entry used a path traversal sequence to resolve an arbitrary binary. That binary then ran as the git service user with full filesystem access.
GitHub.com needed one more injected field. An enterprise-mode boolean defaults to false there, so the custom hooks path was never reached. Injecting it through the same header made the chain work on shared storage nodes. Wiz reported that those nodes exposed index entries for millions of repositories belonging to other tenants.
It said it did not read other tenants’ repository contents. Attackers who target developer platforms often start with stolen credentials, as seen when hackers breached 1Password backend systems through a compromised GitHub account, but this flaw needed only ordinary push access.
The discovery method is notable. Wiz used AI-assisted reverse engineering with IDA MCP to decompile GitHub’s closed-source Go binaries and reconstruct the internal protocol.
The researchers described it as one of the first critical flaws found in closed-source binaries this way. This fits a wider trend in which AI models are surfacing thousands of vulnerabilities in decades-old code paths, and defenders face growing disclosure volume as a result.
GitHub deployed a fix to GitHub.com within hours of the report, and a forensic review found no exploitation outside Wiz’s own testing.
The telemetry check relied on the exploit forcing a code path never used in normal operations. GitHub also removed an unneeded code path from its container image as defense in depth.
GHES administrators carry the remaining risk. Wiz’s original advisory listed 3.14.24, 3.15.19, 3.16.15, 3.17.12, 3.18.6 and 3.19.3 as fixed builds.
GitHub’s later blog update lists newer patch levels: 3.14.25, 3.15.20, 3.16.16, 3.17.13, 3.18.7, 3.19.4 and 3.20.0. Administrators should install the latest patch release for their branch. Wiz’s data indicated that 88% of instances were still unpatched at disclosure.
Defenders should also hunt for abuse. GitHub advises reviewing /var/log/github-audit.log for push operations whose push options contain a semicolon.
Exploitation on GHES requires an authenticated user with push access, so teams should audit that access as well. More broadly, any architecture that passes security-critical state through delimiter-based internal headers should validate and canonicalize input at every trust boundary. For related coverage, see TheCyberDef.
1 thought on “Hackers Could Exploit GitHub Flaw to Execute Malicious Commands With a Single Git Push”