/

CVE-2026-109318

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in Grav Git Sync Plugin

CVE-2026-109318

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Operating-System Command Execution

Severity:

HIGH RISK

(8.8)

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

Grav Git Sync contains a command injection vulnerability in author profile fields used during Git commit operations. An authenticated content editor may be able to execute operating-system commands as the web-server account when author mode is enabled and supplied profile values reach a shell command.

Grav Git Sync contains a command injection vulnerability in author profile fields used during Git commit operations. An authenticated content editor may be able to execute operating-system commands as the web-server account when author mode is enabled and supplied profile values reach a shell command.

Affected context

The issue may occur in Grav Git Sync deployments where authenticated content editors can control username, full-name, or email profile fields and where gravuser or gravfull author mode is enabled. Risk depends on those values being incorporated into a Git command through a shell-executing interface without adequate separation between data and command syntax.

The issue may occur in Grav Git Sync deployments where authenticated content editors can control username, full-name, or email profile fields and where gravuser or gravfull author mode is enabled. Risk depends on those values being incorporated into a Git command through a shell-executing interface without adequate separation between data and command syntax.

Exploit preconditions

  • Attack surface: Grav Git Sync author profile and Git commit handling
  • Required access: Authenticated content-editor permissions capable of changing relevant profile fields
  • Trigger point: A Git commit operation that uses the configured author identity
  • Required configuration: gravuser or gravfull author mode must be enabled
  • Why exploitation is possible: User-controlled author fields reach a shell command executed through PHP exec() without sufficient command and argument isolation
  • Attack surface: Grav Git Sync author profile and Git commit handling
  • Required access: Authenticated content-editor permissions capable of changing relevant profile fields
  • Trigger point: A Git commit operation that uses the configured author identity
  • Required configuration: gravuser or gravfull author mode must be enabled
  • Why exploitation is possible: User-controlled author fields reach a shell command executed through PHP exec() without sufficient command and argument isolation

Why this happens

The underlying bug is the construction of an operating-system command from attacker-influenced profile data and its execution through a shell-capable API. Special shell syntax in a username, full name, or email can therefore be interpreted as command structure rather than treated solely as data. This behavior maps to CWE-78, Improper Neutralization of Special Elements used in an OS Command.

The underlying bug is the construction of an operating-system command from attacker-influenced profile data and its execution through a shell-capable API. Special shell syntax in a username, full name, or email can therefore be interpreted as command structure rather than treated solely as data. This behavior maps to CWE-78, Improper Neutralization of Special Elements used in an OS Command.

Potential impact

  • An attacker may execute commands with the privileges of the web-server account.
  • The application or its stored content could be modified or compromised.
  • Repository data, credentials, or other locally accessible secrets could be exposed.
  • The attacker could tamper with Git history or synchronized content.
  • The compromised account could be used for further lateral movement, depending on deployment permissions.
  • An attacker may execute commands with the privileges of the web-server account.
  • The application or its stored content could be modified or compromised.
  • Repository data, credentials, or other locally accessible secrets could be exposed.
  • The attacker could tamper with Git history or synchronized content.
  • The compromised account could be used for further lateral movement, depending on deployment permissions.

General mitigation guidance

Mitigation generally focuses on preventing user-controlled values from being

interpreted by a shell.

Common defensive patterns include:

  • Prefer native process APIs that pass executable arguments separately rather than invoking a shell.
  • Treat profile fields as untrusted data and apply strict, context-appropriate validation.
  • Use allowlisted character sets and bounded lengths for Git author identity fields where compatible with application requirements.
  • Avoid dynamic command-string construction and ensure argument escaping is not the sole security boundary.
  • Restrict the web-server account's filesystem, repository, and process privileges.
  • Limit which authenticated roles can alter author identity fields or trigger synchronization operations.
  • Keep sensitive credentials and writable repositories outside unnecessarily privileged application contexts.

Mitigation generally focuses on preventing user-controlled values from being

interpreted by a shell.

Common defensive patterns include:

  • Prefer native process APIs that pass executable arguments separately rather than invoking a shell.
  • Treat profile fields as untrusted data and apply strict, context-appropriate validation.
  • Use allowlisted character sets and bounded lengths for Git author identity fields where compatible with application requirements.
  • Avoid dynamic command-string construction and ensure argument escaping is not the sole security boundary.
  • Restrict the web-server account's filesystem, repository, and process privileges.
  • Limit which authenticated roles can alter author identity fields or trigger synchronization operations.
  • Keep sensitive credentials and writable repositories outside unnecessarily privileged application contexts.

How teams detect issues like this

Detection approaches may include:

  • Static analysis rules identifying exec(), shell invocation, and dynamically concatenated command strings.
  • Searches for Git command construction that incorporates request, profile, metadata, or form values.
  • Code review checks for missing argument separation, allowlisting, and validation at trust boundaries.
  • Runtime monitoring for unexpected child processes spawned by the web server or CMS process.
  • Audit logging of author-field changes, commit operations, and process execution failures.
  • Policy enforcement that blocks shell-capable APIs in application code unless narrowly reviewed and justified.

Detection approaches may include:

  • Static analysis rules identifying exec(), shell invocation, and dynamically concatenated command strings.
  • Searches for Git command construction that incorporates request, profile, metadata, or form values.
  • Code review checks for missing argument separation, allowlisting, and validation at trust boundaries.
  • Runtime monitoring for unexpected child processes spawned by the web server or CMS process.
  • Audit logging of author-field changes, commit operations, and process execution failures.
  • Policy enforcement that blocks shell-capable APIs in application code unless narrowly reviewed and justified.

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-c89w-55m3-fmf7
vulncheck.comvulncheck.com/advisories/grav-git-sync-1.0.2-through-3.4.12-command-injection-via-commit-author

Frequently asked

questions

Exploitation generally requires an authenticated content editor who can control

the affected author profile fields and trigger a Git operation under a

compatible author-mode configuration.

Not necessarily. The relevant access may be provided through the application,

but the attacker still needs the required authenticated role and enabled

functionality.

Keep profile values separate from executable command syntax by using a

non-shell process interface with explicit arguments, combined with strict

validation and appropriate authorization controls.

Review all operating-system command boundaries, prohibit dynamic shell command

construction, monitor web-server child processes, and apply least privilege

to application and repository accounts.

Exploitation generally requires an authenticated content editor who can control

the affected author profile fields and trigger a Git operation under a

compatible author-mode configuration.

Not necessarily. The relevant access may be provided through the application,

but the attacker still needs the required authenticated role and enabled

functionality.

Keep profile values separate from executable command syntax by using a

non-shell process interface with explicit arguments, combined with strict

validation and appropriate authorization controls.

Review all operating-system command boundaries, prohibit dynamic shell command

construction, monitor web-server child processes, and apply least privilege

to application and repository accounts.

Find out what's already
exploitable in your codebase.