CVE-2026-82668
klaussilveira GitList Git Command Line CommandLine.php getDefaultBranch os command injection
Refuses subprocess execution by git processes spawned from PHP to mitigate CVE-2026-82668 in GitList.
Medium 5.5Vetted
EPSS 2.2%: the estimated chance this CVE is exploited in the next 30 days, as of 24 Nov 2026.
At a glance
CVE-2026-82668 is a medium (CVSS 5.5) vulnerability in GitList, published 31 August 2026. A vetted upatch, cve-2026-82668-exec-block, blocks it on running Linux machines with shirudo until GitList is upgraded.
- Severity
- Medium 5.5 CVSS 4.0
- Chance of exploitation
- 2.2% in the next 30 days (EPSS, 24 Nov 2026)
- Known exploited
- No, not on CISA’s KEV list
- Affected software
- GitList (klaussilveira)
- Upatch status
- Vetted, merged into the registry
- How to apply
- Build, sign and roll out with shirudo
Overview
CVE-2026-82668, published on 31 August 2026, is a command execution vulnerability in klaussilveira GitList 2.0.0 (src/SCM/System/Git/CommandLine.php). While the NVD summary names getDefaultBranch, the underlying issue reported in GitHub issue #947 and fixed in commit 88cf2866083d5f7c20d9d565c45f828a7ad1516b is that getCommit and getBlame invoke git show and git blame without --no-textconv. When a trusted repository defines a diff.<driver>.textconv helper in .git/config and maps files to that driver in .gitattributes, viewing a commit or blame page causes git to execute the repository's textconv command as the web service user.
Official description
A security vulnerability has been detected in klaussilveira GitList 2.0.0. Affected by this vulnerability is the function getDefaultBranch of the file src/SCM/System/Git/CommandLine.php of the component Git Command Line. Such manipulation leads to os command injection. The attack can be executed remotely. The exploit has been disclosed publicly and may be used. Upgrading to version 3.0.0-beta addresses this issue. The name of the patch is 88cf2866083d5f7c20d9d565c45f828a7ad1516b. Upgrading the affected component is advised.
Affected versions
| Software | Affected | Fixed in |
|---|---|---|
| klaussilveira GitList | 2.0.0 | 3.0.0-beta (88cf2866083d5f7c20d9d565c45f828a7ad1516b) |
Sources
More references from NVD (8)
Mitigation
It attaches to lsm/bprm_check_security and returns -EPERM when the task calling execve still has git as its current executable (task->mm->exe_file) and one of its ancestors within four real_parent hops has an executable whose name starts with php (such as php, php8.4 or php-fpm8.4).
In Linux, security_bprm_check runs before begin_new_exec replaces current->mm->exe_file. When PHP starts /usr/bin/git, current's executable is php*, so git starts normally. All Git commands that src/SCM/System/Git/CommandLine.php runs (symbolic-ref, for-each-ref, ls-tree, show, log, blame and archive) are built into the git binary and need no child processes during normal operation. Only when git forks and calls execve to run an external helper such as a diff.<driver>.textconv command does bprm_check_security see a git task with a php* ancestor and refuse the execution.
Refusals are counted in the refused per-CPU array map at key 0. Any negative verdict from an earlier BPF LSM program on the hook is preserved.
Side effects
- Viewing a commit (
getCommit) or blame (getBlame) on a repository entry that relies on an externaldiff.<driver>.textconvhelper or external diff driver fails with HTTP 500 becausegitcannot execute the helper. This matches the behavior of passing--no-textconvin preventing helper execution, except thatgit showerrors out instead of rendering the raw blob. - Normal repository listing, tree browsing, blob viewing, commit diffs without external
textconvhelpers, commit history and archive downloads keep working. - Interactive or system
gitinvocations outside PHP processes are unaffected.
Preemption model and cost
The program holds no state other than the per-CPU refused counter updated with __sync_fetch_and_add, making it safe under every preemption model including preemptible RCU and PREEMPT_RT. On every execve where the calling process's executable name is not three bytes long (git), the hook returns after reading d_name.len. Only execve calls made by a git process walk up to four real_parent pointers.
The policy
101 lines of BPF C, attached at lsm/bprm_check_security.
// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>
#define EPERM 1
char _license[] SEC("license") = "Dual BSD/GPL";
struct {
__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
__uint(max_entries, 1);
__type(key, __u32);
__type(value, __u64);
} refused SEC(".maps");
static __always_inline void count_refused(void)
{
__u32 key = 0;
__u64 *value = bpf_map_lookup_elem(&refused, &key);
if (value)
__sync_fetch_and_add(value, 1);
}
static __always_inline const struct dentry *
task_exe_dentry(const struct task_struct *task)
{
return BPF_CORE_READ(task, mm, exe_file, f_path.dentry);
}
static __always_inline bool dentry_is_git(const struct dentry *dentry)
{
const unsigned char *name;
char buf[3] = {};
if (!dentry || BPF_CORE_READ(dentry, d_name.len) != 3)
return false;
name = BPF_CORE_READ(dentry, d_name.name);
if (!name || bpf_probe_read_kernel(buf, sizeof(buf), name))
return false;
return buf[0] == 'g' && buf[1] == 'i' && buf[2] == 't';
}
static __always_inline bool dentry_starts_with_php(const struct dentry *dentry)
{
const unsigned char *name;
__u32 len;
char buf[3] = {};
if (!dentry)
return false;
len = BPF_CORE_READ(dentry, d_name.len);
if (len < 3)
return false;
name = BPF_CORE_READ(dentry, d_name.name);
if (!name || bpf_probe_read_kernel(buf, sizeof(buf), name))
return false;
return buf[0] == 'p' && buf[1] == 'h' && buf[2] == 'p';
}
static __always_inline bool has_php_ancestor(const struct task_struct *task)
{
const struct task_struct *cur = task;
for (int i = 0; i < 4; i++) {
const struct task_struct *parent =
BPF_CORE_READ(cur, real_parent);
if (!parent || parent == cur)
return false;
if (dentry_starts_with_php(task_exe_dentry(parent)))
return true;
cur = parent;
}
return false;
}
static __always_inline int earlier_verdict(int ret)
{
return ret >= -4095 && ret < 0 ? ret : -EPERM;
}
SEC("lsm/bprm_check_security")
int BPF_PROG(cve_2026_82668_exec, struct linux_binprm *bprm, int ret)
{
struct task_struct *task;
if (ret)
return earlier_verdict(ret);
task = bpf_get_current_task_btf();
if (!dentry_is_git(task_exe_dentry(task)))
return 0;
if (!has_php_ancestor(task))
return 0;
count_refused();
return -EPERM;
}
The package: name, license, the program and the CVE it fixes.
[package]
name = "cve-2026-82668"
description = "Refuses subprocess execution by git processes spawned from PHP to mitigate CVE-2026-82668 in GitList"
license = "GPL-2.0 OR BSD-2-Clause"
[[upatches]]
source = "cve-2026-82668-exec-block.bpf.c"
[upatches.tree]
id = "cve-2026-82668-exec-block"
fixes = ["CVE-2026-82668"]
Process
How this upatch was written, checked and reviewed, from the registry’s history.
- 31 Aug 2026CVECVE published
- 25 Nov 2026Pull requestPull request #25 openedAdd CVE-2026-82668: Refuses subprocess execution by git processes spawned from PHP to mitigateromanlab
- 25 Nov 2026MergeMerged #25romanlab
- 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)
No human review is recorded on GitHub for this upatch yet.
Evidence
On a vulnerable klaussilveira GitList 2.0.0 instance, the loaded upatch refused git's execution of a repository-configured diff.poc.textconv helper during commit rendering.
- Tested
- 25 Nov 2026
- Target
- klaussilveira GitList 2.0.0 served by PHP on 127.0.0.1:18080 with a repository configuring diff.poc.textconv
- Kernel
- 7.4-shirudo-ci-20261123
- Architecture
- x86_64
- Distribution
- Ubuntu 26.04
| State | Commit view runs diff.poc.textconv helper (/usr/bin/rev) |
|---|---|
| Before loading | yes (HTTP 200) |
| Upatch loaded | no (HTTP 500, EPERM) |
| After unloading | yes (HTTP 200) |
tools-test.log Output of tools/test --setup on the shirudo test VM.
tools/test --setup, 2026-11-25T11:15:36Z Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm cve-2026-82668 setup done GITLIST_COMMIT_URL=http://127.0.0.1:18080/probe/commit/008c09a9bc45822815787ec9df7a0d2c213a4093 before reached git show executed the repository diff.poc.textconv helper (/usr/bin/rev) loaded blocked commit view failed with HTTP 500 when git tried to execute the textconv helper after reached git show executed the repository diff.poc.textconv helper (/usr/bin/rev) PASS: reached before, blocked while loaded, reached again after
Use it
Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-82668shirudo bpm push build/packages/cve-2026-82668-1.0.0.bee oci://<registry>/<namespace>/cve-2026-82668 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-82668-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>