---
id: CVE-2026-106058
title: >-
  GitAhead through 2.7.1 contains an OS command injection vulnerability in
  src/git/Filter.cpp that allows malicious repositories to execute commands by
  substituting crafted filenames into clean/smudge filter commands
summary: >-
  GitAhead through 2.7.1 contains an OS command injection vulnerability in
  src/git/Filter.cpp that allows malicious repositories to execute commands by
  substituting crafted filenames into clean/smudge filter commands. Attackers
  can ship fi…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H'
cwe:
  - CWE-78
vendor: gitahead
product: gitahead
affected:
  - gitahead <= 2.7.1
published: '2026-10-07'
updated: '2026-10-07'
sourceUpdated: '2026-10-07T12:17:08.920'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-106058'
references:
  - url: 'https://github.com/gitahead/gitahead'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/gitahead/gitahead/blob/v2.7.1/src/git/Filter.cpp#L43-L70
    label: disclosure@vulncheck.com
  - url: 'https://github.com/gitahead/gitahead/issues/661'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/gitahead-through-2.7.1-os-command-injection-via-git-filter-filenames
    label: disclosure@vulncheck.com
tags:
  - nvd
  - cve.org
ingestedAt: '2026-10-07T12:29:01.367Z'
---

## Overview

GitAhead through 2.7.1 contains an OS command injection vulnerability in src/git/Filter.cpp that allows malicious repositories to execute commands by substituting crafted filenames into clean/smudge filter commands. Attackers can ship files named with $(command) selected via .gitattributes so checkout or staging runs the command through bash -c as the victim.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
