/

CVE-2026-82668

Severity:

HIGH RISK

(7.3)

OS Command Injection (CWE-78) in GitList Git Command

CVE-2026-82668

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

GitList 2.0.0 contains an OS command injection vulnerability in the Git Command Line component's getDefaultBranch function. A remote attacker may be able to influence command input and execute operating-system commands when the affected function processes attacker-controlled data.

Affected context

The vulnerability occurs in GitList's command-line Git integration, specifically in src/SCM/System/Git/CommandLine.php. It becomes risky when a remotely reachable request or repository-related input can influence the branch information passed to getDefaultBranch and that value is incorporated into an operating-system command without adequate separation from command syntax.

Exploit preconditions

  • Attack surface: A remotely reachable GitList function that invokes the Git Command Line component
  • Required access: The ability to submit or control input processed by the affected repository or branch-handling workflow; authentication requirements depend on deployment configuration
  • Trigger point: Invocation of getDefaultBranch in src/SCM/System/Git/CommandLine.php
  • Why exploitation is possible: Attacker-influenced data may be concatenated into an operating-system command without reliable argument separation or neutralization

Why this happens

The underlying bug is command construction from insufficiently trusted input. When application data is embedded into a shell or operating-system command, command metacharacters or interpreted syntax may alter the intended operation. This maps primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command, with CWE-77: Improper Neutralization of Special Elements in Output Used by a Downstream Component describing the broader command-injection pattern.

Potential impact

  • An attacker may execute arbitrary operating-system commands under the GitList process account
  • The application or host may be compromised
  • Repository contents, credentials, or configuration data could be accessed or modified
  • Malicious changes could affect hosted source code or downstream build processes
  • The attacker could use the compromised service as a foothold for further network activity

General mitigation guidance

Mitigation generally focuses on avoiding shell interpretation and reducing the trust placed in repository and branch-related input.

Common defensive patterns include:

  • Prefer structured process-execution APIs that pass arguments separately instead of invoking a shell
  • Validate branch and repository values against the expected format and permitted character set
  • Apply context-appropriate escaping only as a secondary control, not as a substitute for safe process APIs
  • Run GitList with a dedicated, least-privileged service account and restrict filesystem and network permissions
  • Keep repository operations isolated from sensitive credentials and administrative interfaces
  • Use secure-by-default command wrappers and centralize validation for all Git command parameters

How teams detect issues like this

Organizations can look for command-injection risks through:

  • Static analysis rules identifying shell execution, command concatenation, interpolation, or unsafe process APIs
  • Code review checks for user-controlled values reaching Git or operating-system command runners
  • Tests that verify arguments remain distinct when they contain shell metacharacters or unexpected delimiters
  • Runtime monitoring for unusual child processes, unexpected Git arguments, or outbound connections from the application service
  • Policy enforcement requiring structured subprocess APIs and approved command wrappers

Automated security review tools may help identify data flows from HTTP or repository inputs into command execution sinks.

Sources

SourceLink
github.comgithub.com/klaussilveira/gitlist/
github.comgithub.com/klaussilveira/gitlist/commit/88cf2866083d5f7c20d9d565c45f828a7ad1516b
github.comgithub.com/klaussilveira/gitlist/issues/947
github.comgithub.com/klaussilveira/gitlist/releases/tag/3.0.0-beta
vuldb.comvuldb.com/cve/CVE-2026-82668
vuldb.comvuldb.com/submit/893866
vuldb.comvuldb.com/vuln/397167
vuldb.comvuldb.com/vuln/397167/cti

Frequently asked

questions

The vulnerability is described as remotely exploitable. Practical exploitability depends on whether a remotely accessible GitList workflow allows attacker-controlled data to reach getDefaultBranch.

Not necessarily. The required access depends on the application's exposure and authorization controls, but the key condition is influence over input processed by the affected Git command path.

Avoid shell-based command construction and invoke Git through an API that passes validated arguments separately. Strictly constrain branch-related input and apply least privilege to the service account.

Use centralized input validation, secure process-execution wrappers, code review rules for command sinks, and runtime monitoring for unexpected child-process behavior.

Find out what's already
exploitable in your codebase.