Detect CVE-2026-52806: Gogs RCE via git rebase --exec Argument Injection in PR Merge in Splunk
Detects exploitation of CVE-2026-52806, a critical command injection vulnerability (CWE-77) in Gogs versions prior to 0.14.3. An attacker can inject arbitrary shell commands via the git rebase --exec argument during pull request merge operations, leading to remote code execution on the Gogs server. A public PoC is available.
MITRE ATT&CK
- Tactic
- Execution Persistence Lateral Movement
SPL Detection Query
index=os OR index=endpoint sourcetype IN ("linux_secure", "WinEventLog:Security", "xmlwineventlog", "crowdstrike:events:sensor")
| eval cmd=coalesce(CommandLine, process, command)
| eval parent=coalesce(ParentProcessName, parent_process_name, ppid_name)
| where (match(cmd, "git\s+rebase") AND match(cmd, "--exec"))
OR (match(lower(parent), "gogs") AND match(cmd, "(curl|wget|bash|sh|nc|ncat|python|perl|powershell|cmd\.exe)"))
| eval injection_indicator=if(match(cmd, "--exec[= ]['\"]?[^'\"]*[;&|`\$]"), "argument_injection", "suspicious_child")
| eval risk_score=case(
injection_indicator=="argument_injection", 95,
injection_indicator=="suspicious_child", 75,
true(), 50
)
| table _time, host, user, parent, cmd, injection_indicator, risk_score
| sort -risk_score Detects git rebase --exec argument injection and suspicious child process spawning from Gogs parent processes across Linux and Windows endpoints. Scores findings by injection confidence.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Legitimate git rebase --exec usage in developer CI/CD workflows on systems where Gogs is deployed
- Authorized penetration testing activities using git rebase injection techniques
- Automated backup or maintenance scripts run under the Gogs service account invoking curl or wget
Other platforms for CVE-2026-52806
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Simulate git rebase --exec argument injection via crafted PR branch name
Expected signal: Process creation event: git with args [rebase, --exec, id > /tmp/cve_rce_proof.txt, target]; child process creation: sh -c 'id > /tmp/cve_rce_proof.txt'; file creation event at /tmp/cve_rce_proof.txt
- Test 2Gogs suspicious child process simulation — reverse shell via curl
Expected signal: Process creation event showing bash or curl with parent process name 'gogs'; network connection attempt from gogs-named process to 127.0.0.1:9999
- Test 3Persistence via cron injection post-Gogs RCE simulation
Expected signal: Process creation: git rebase --exec with crontab modification command; crontab process invocation; file write to /tmp/cve_persist_marker.txt; audit log entry for crontab modification
Unlock Pro Content
Get the full detection package for CVE-2026-52806 including response playbook, investigation guide, and atomic red team tests.