# CVE-2026-82668: klaussilveira GitList Git Command Line CommandLine.php getDefaultBranch os command injection

The Markdown version of <https://upatch.dev/cve/CVE-2026-82668>. Last updated 25 Nov 2026.

## At a glance

CVE-2026-82668 is rated Medium 5.5 (CVSS 4.0, CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X). It affects GitList (klaussilveira) and was published on 31 Aug 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 2.2%: the estimated chance it is exploited in the next 30 days, as of 24 Nov 2026. The upatch `cve-2026-82668-exec-block` mitigates it, and is vetted (merged into the registry).

A upatch is a signed BPF program that shirudo loads into a running Linux kernel to block the code path this CVE's exploit takes. It holds the line until the fix ships; it does not replace patching.

## The vulnerability

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.

## What the upatch does

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.

The policy: [`cve-2026-82668-exec-block.bpf.c`](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-82668), 101 lines of BPF C attached at `lsm/bprm_check_security`, licensed GPL-2.0 OR BSD-2-Clause.

## Side effects

- Viewing a commit (`getCommit`) or blame (`getBlame`) on a repository entry that relies on an external `diff.<driver>.textconv` helper or external diff driver fails with HTTP 500 because `git` cannot execute the helper. This matches the behavior of passing `--no-textconv` in preventing helper execution, except that `git show` errors out instead of rendering the raw blob.
- Normal repository listing, tree browsing, blob viewing, commit diffs without external `textconv` helpers, commit history and archive downloads keep working.
- Interactive or system `git` invocations 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.

## Affected versions

| Software              | Affected | Fixed in                                                |
| --------------------- | -------- | ------------------------------------------------------- |
| klaussilveira GitList | 2.0.0    | 3.0.0-beta (`88cf2866083d5f7c20d9d565c45f828a7ad1516b`) |

## How it was tested

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

### Results

| 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)                                           |

## How to apply

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.

Build and sign:

```sh
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-82668
```

Publish and roll out:

```sh
shirudo 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>
```

## Review

- Contributors: romanlab.
- Reviewers: none recorded yet.

## Sources and links

- [CVE-2026-82668 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-82668)
- [GitHub issue #947](https://github.com/klaussilveira/gitlist/issues/947)
- [Fix commit 88cf2866083d](https://github.com/klaussilveira/gitlist/commit/88cf2866083d5f7c20d9d565c45f828a7ad1516b)
- [GitList 2.0.0 release](https://github.com/klaussilveira/gitlist/releases/tag/2.0.0)
- [GitList 3.0.0-beta release](https://github.com/klaussilveira/gitlist/releases/tag/3.0.0-beta)

### Links

- [CVE-2026-82668 on upatch.dev](https://upatch.dev/cve/CVE-2026-82668) (this page, as HTML)
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-82668)
- [CVE.org](https://www.cve.org/CVERecord?id=CVE-2026-82668)
- [CWE-77](https://cwe.mitre.org/data/definitions/77.html)
- [CWE-78](https://cwe.mitre.org/data/definitions/78.html)
- Upatch source: [upatches/cve-2026-82668](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-82668)

### More references from NVD (8)

- [github.com](https://github.com/klaussilveira/gitlist/)
- [github.com](https://github.com/klaussilveira/gitlist/commit/88cf2866083d5f7c20d9d565c45f828a7ad1516b)
- [github.com](https://github.com/klaussilveira/gitlist/issues/947)
- [github.com](https://github.com/klaussilveira/gitlist/releases/tag/3.0.0-beta)
- [vuldb.com](https://vuldb.com/cve/CVE-2026-82668)
- [vuldb.com](https://vuldb.com/submit/893866)
- [vuldb.com](https://vuldb.com/vuln/397167)
- [vuldb.com](https://vuldb.com/vuln/397167/cti)
