CVE-2026-3854: One Git Push Could Run Code on GitHub
A single crafted git push let any user with push access run commands on GitHub's servers. GitHub fixed GitHub.com in hours; self-hosted Enterprise Server admins must upgrade.
TL;DR
- CVE-2026-3854 let anyone with push access to a repository run commands on GitHub's servers through one crafted git push, rated 8.7 [^1] [^3].
- GitHub fixed GitHub.com the same day and found no exploitation, but self-hosted Enterprise Server admins must upgrade to 3.19.4 or the matching patch [^2].
Background
When you run git push to GitHub, the request does not reach a single program. It passes through several internal services that hand the push and its metadata to one another over GitHub's own protocol [^1] [^2]. The flaw was not in any repository's code or in GitHub Actions, but in that internal pipeline, which processes every push on both GitHub.com and GitHub Enterprise Server, the version companies host themselves [^1].
What happened
Researchers at the security firm Wiz reported the vulnerability to GitHub's Bug Bounty program on March 4, 2026. GitHub says it reproduced the bug within 40 minutes and deployed a fix to GitHub.com the same day, less than two hours after identifying the root cause [^2]. The CVE was published on March 10, and Wiz disclosed the details on April 28 [^1] [^3].
The weak point is git push options, an ordinary git feature that lets a client send key-value strings to the server during a push. GitHub copied those user-supplied values into an internal header without sanitizing them, and that header used a semicolon as its field delimiter, with later fields overriding earlier ones [^1] [^2]. By placing a semicolon in a push option value, an attacker could inject their own fields, which downstream services treated as trusted. Wiz chained three of them to switch the server out of its sandboxed code path, redirect where it looked for hook scripts, and point it at an arbitrary file, which then ran as the git service user [^1]. NVD rates the flaw 8.7 under CVSS 4.0 and 8.8 under CVSS 3.1, and classifies it as command injection, CWE-77 [^3].
On GitHub.com, code execution landed on a shared storage node as the git user, which by design can read every repository on that node; Wiz enumerated millions of repository index entries across two nodes but says it accessed only its own test accounts' content [^1]. On Enterprise Server, the same bug meant full compromise of the instance and every repository and secret on it [^1]. Wiz found the flaw by reverse-engineering GitHub's compiled binaries with AI-assisted tooling, which it calls "one of the first critical vulnerabilities discovered in closed-source binaries using AI" [^1]. GitHub's forensic review found no exploitation: the exploit forces a code path never used in normal operation, and every occurrence in its logs mapped to the Wiz researchers' own testing [^2].
Why it matters
The two halves of GitHub's user base face very different risk. GitHub.com and the managed Enterprise Cloud tiers were patched server-side, and GitHub says those users need do nothing [^2]. Self-hosted Enterprise Server is patched by each customer's own admins, so it stays exposed until they act. At the time Wiz published, it says 88% of Enterprise Server instances were still running a vulnerable version [^1]. GitHub shipped fixes in 3.14.25, 3.15.20, 3.16.16, 3.17.13, 3.18.7, 3.19.4 and 3.20.0; its release notes record that 3.19.3 was unpublished for operational reasons, leaving 3.19.4 as the 3.19 fix [^2] [^4].
Wiz frames the deeper lesson as a problem of trust between services. Several programs, written in different languages, passed data through one internal format; one assumed push option values were safe to embed, another assumed every field in the header came from a trusted source, and in combination those reasonable assumptions became a path to code execution [^1]. GitHub adds its own: the vulnerable hook code was present in the production image at all only because an older deployment method had excluded it and the exclusion was not carried forward when the deployment model changed [^2].
Practical example
Say Priya administers a GitHub Enterprise Server for a mid-size company, on a 3.19 release older than 3.19.4 [^2] [^4]. A contractor's account, with push access to one minor repository, is phished. That is all the attacker needs: exploitation on Enterprise Server only requires an authenticated user who can push [^2].
The attacker clones the repository and runs a single git push, but attaches a crafted push option whose value contains a semicolon [^1] [^2]. On the server, that semicolon breaks the value out of its field in the internal header and adds new fields the attacker controls. One flips the server off its sandboxed path, one changes the directory it searches for hook scripts, and one names a script through a path-traversal string. The pre-receive step then runs that file directly, as the git service user [^1]. From there the attacker can read every repository on the instance and the secrets stored with them [^1].
Priya's fix is to upgrade to 3.19.4 or the patch for the installed series, which stops the injection at its source [^2]. To check whether anyone tried it first, GitHub says to review /var/log/github-audit.log for push operations whose push options contain a semicolon [^2].
Related gear
We recommend this book because it teaches how to audit the way software parses and trusts input, which is exactly where this flaw hid.
The Art of Software Security Assessment: Identifying and Preventing Software Vulnerabilities
Sources
- [1]Wiz — GitHub RCE Vulnerability: CVE-2026-3854 Breakdown
- [2]GitHub — Securing the git push pipeline: Responding to a critical remote code execution vulnerability
- [3]NVD — CVE-2026-3854
- [4]GitHub — Release notes - GitHub Enterprise Server 3.19
- [5]Hacker News — GitHub RCE Vulnerability: CVE-2026-3854 Breakdown