Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-3854-PoC — GitHub RCE via X-Stat Push Option Injection | Kitploit
Tools/GitHubGitHub/lysophavin18/cve-2026-3854-poc
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationPenetration TestingLearning & Education
GitHublysophavin18/cve-2026-3854-poc

CVE-2026-3854-PoC

GitHub RCE via X-Stat Push Option Injection

View Repository
23 months agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-3854 PoC — GitHub RCE via X-Stat Push Option Injection

For educational and authorized security research purposes only.
Do not use against any system without explicit written permission.


Overview

CVE-2026-3854 is a Remote Code Execution vulnerability in GitHub Enterprise Server's (and GitHub.com's) git push pipeline.

When a client supplies push options (git push -o), GitHub's internal Ruby code builds an X-Stat header by concatenating each option value with semicolons as field delimiters. Because values were inserted verbatim (without sanitisation), an attacker could embed semicolons in a push option to inject arbitrary key-value fields into the header and override security-critical settings — ultimately achieving unsandboxed RCE as the git user.

Vulnerability root cause

root@kitploit:~
X-Stat: repo_id=12345;user_id=alice;rails_env=production;...;push_option_0=<USER INPUT>

Injecting normal_value;rails_env=staging as the push option value turns into:

root@kitploit:~
...;push_option_0=normal_value;rails_env=staging

The parser takes the last occurrence of each key, so rails_env is now staging (unsandboxed), overriding the legitimate production value set earlier.


Requirements

  • Python 3.10 or later (uses built-in list[str] / dict[str, str] type hints)
  • No third-party packages required

Usage

root@kitploit:~
python3 exploi-git.py

The script runs three back-to-back demonstrations entirely in memory — no network connections, no shell commands, no file writes:

DemoWhat it shows
1Basic semicolon injection overriding rails_env
2Full 3-step conceptual RCE chain
3Patched behaviour — semicolons are percent-encoded and injection is neutralised

Patch

GitHub fixed the vulnerability by percent-encoding semicolons in push option values before inserting them into the X-Stat header:

root@kitploit:~
normal_value;rails_env=staging  →  normal_value%3Brails_env=staging

This makes the semicolon a literal part of the value and breaks the injection.


References

  • Wiz Research blog post
  • GitHub Security Blog
  • NVD — CVE-2026-3854

Disclaimer

This repository is provided solely for educational purposes and to support authorized security research. The author(s) assume no responsibility for misuse. Always obtain explicit written permission before testing against any system you do not own.

Download Tool