p PatchFirst

PatchFirst · Latest vulnerabilities

gitpython vulnerabilities

Vulnerabilities published for gitpython in the last 30 days: 2. Listed in the KEV catalogue: 0.

RSS ↗
Filter vulnerabilities
Clear filters

Vulnerabilities: 38

  1. CVE-2026-114145

    High · CVSS 7.5EPSS 0.26%Public exploitFix available

    GitPython validates a submodule's ".git" path only after cloning into it (RCE)

    GitPython is a python library used to interact with Git repositories. Prior to 3.2.1, create_submodule() in git/objects/submodule/base.py accepts an attacker-influenced submodule path such as .git/hooks and invokes _clone_repo() before safely rejecting the destination. In 3.1.x, _validate_repo_path() does not exist and the call succeeds silently, while in 3.2.0 and later affected revisions the check in git/index/base.py raises ValueError only after the clone has written to disk and does not remove the planted file. An attacker-controlled submodule can therefore place an executable post-checkout hook that a later Git operation executes. Exploi

    • Update to 3.2.1
    Published Updated
  2. CVE-2026-100689

    High · CVSS 8.7EPSS 0.4%Fix available

    GitPython before 3.1.62 Path Traversal via gitmodules path

    GitPython before 3.1.62 does not validate the `path` field read from an untrusted .gitmodules file when updating submodules. While a prior fix (GHSA-hmq2-w58f-27jc) added Submodule._validated_name() to constrain the `name` field, and GitPython's own containment guard Submodule._to_relative_path() is applied in add() and move(), Submodule.update() derives the absolute checkout location from the raw `path` value without that guard. A .gitmodules entry containing directory traversal components (e.g., path = ../../../tmp/escaped) can therefore cause directories to be created via os.makedirs() outside the repository working tree, populated from th

    • Update to 3.1.62
    Published Updated
  3. CVE-2026-87819

    High · CVSS 8.7EPSS 0.52%Fix available

    GitPython before 3.1.60 Denial of Service via ReDoS

    GitPython before 3.1.60 contains a regular expression denial of service vulnerability in Actor.name_email_regex that processes commit author and committer fields. Attackers can craft a commit object with a malformed author field containing an unterminated angle bracket to cause quadratic backtracking, exhausting CPU resources for over two minutes per commit access.

    • Update to 3.1.60
    Published Updated
  4. CVE-2026-87818

    High · CVSS 7.1EPSS 0.41%Fix available

    GitPython 3.1.59 Local File Content Oracle via --no-index

    GitPython 3.1.59 fails to restrict the --no-index option in the high-level diff API, allowing attackers to read arbitrary filesystem paths as repository operands. Attackers can combine --no-index with -I/--ignore-matching-lines to create a content-dependent Boolean oracle, repeatedly querying local files to recover single-line secrets through distinguishable success or error responses.

    • Update to 3.1.60
    Published Updated
  5. CVE-2026-87817

    High · CVSS 8.7EPSS 0.4%Public exploitFix available

    GitPython before 3.1.60 Remote Code Execution via Git Directory Impersonation

    GitPython before 3.1.60 fails to properly validate the git directory location, allowing attackers to impersonate the git directory using tracked files like gitdir, commondir, and HEAD. Attackers can execute arbitrary code by placing a malicious pre-commit hook in the tracked hooks directory that executes when a victim calls index.commit() on a cloned or opened repository.

    • Update to 3.1.60
    Published Updated
  6. CVE-2026-78679

    High · CVSS 7.1EPSS 0.26%Fix available

    GitPython before 3.1.59 Arbitrary File Read via TagReference.create

    GitPython before 3.1.59 contains an arbitrary file read vulnerability in TagReference.create() where a positional reference parameter bypasses the unsafe option guard. Attackers can supply a reference value like --file=<path> to read arbitrary files, with contents returned in the annotated tag message.

    • Update to 3.1.59
    Published Updated
  7. CVE-2026-78678

    High · CVSS 7.1EPSS 0.41%Fix available

    GitPython before 3.1.59 Arbitrary File Read via Repo.blame()

    GitPython versions before 3.1.59 contain an incomplete denylist in the unsafe_git_revision_options guard that omits --contents and -S options, allowing attackers to read arbitrary files by passing these options to Repo.blame(). Attackers can supply revision values like --contents=/etc/passwd to leak file contents through the blame result returned to the caller.

    • Update to 3.1.59
    Published Updated
  8. CVE-2026-78677

    High · CVSS 8.7EPSS 0.65%Fix available

    GitPython before 3.1.59 Path Traversal via separate-git-dir

    GitPython before 3.1.59 omits --separate-git-dir from unsafe_git_clone_options, allowing attackers to create arbitrary git directories outside the intended clone destination. Attackers can pass a separate_git_dir parameter to Repo.clone_from() or Repo.clone() to redirect repository metadata to an attacker-controlled filesystem path, enabling arbitrary directory creation and potential hook execution.

    • Update to 3.1.59
    Published Updated
  9. CVE-2026-78676

    Critical · CVSS 9.3EPSS 0.78%Fix available

    GitPython before 3.1.59 Remote Code Execution via Config Injection

    GitPython before 3.1.59 fails to safely re-serialize multi-line git-config values during write operations, corrupting dormant quoted values into injected directives like core.hooksPath. Attackers can craft config files with embedded newlines that become live git directives after any unrelated GitPython config write, enabling arbitrary code execution via hook invocation.

    • Update to 3.1.59
    Published Updated
  10. CVE-2026-78675

    High · CVSS 8.6EPSS 0.18%Fix available

    GitPython before 3.1.59 Local File Content Disclosure via .gitmodules

    GitPython before 3.1.59 fails to disable merge_includes when parsing .gitmodules, allowing attackers to disclose local file content by including arbitrary file paths via [include] directives. Attackers can craft a malicious .gitmodules file with include directives pointing to sensitive files; when repo.submodules is accessed, GitConfigParser raises MissingSectionHeaderError embedding the target file's first line verbatim in the exception message.

    • Update to 3.1.59
    Published Updated
  11. CVE-2026-76222

    High · CVSS 8.4EPSS 0.42%Fix available

    GitPython before 3.1.58 Path Traversal via .gitmodules Submodule Name

    GitPython before 3.1.58 fails to validate submodule names from .gitmodules files, allowing attackers to create Git repositories at arbitrary filesystem paths outside the intended clone directory. Attackers can craft malicious repositories with traversal sequences in submodule names that GitPython processes during submodule initialization, creating attacker-controlled Git repositories at escaped filesystem locations.

    • Update to 3.1.58
    Published Updated
  12. CVE-2026-76221

    High · CVSS 8.7EPSS 0.77%Fix available

    GitPython before 3.1.58 Config Injection via option-name

    GitPython before 3.1.58 contains a config-name injection vulnerability in the option-name validator that allows attackers to forge arbitrary git-config directives by injecting equals signs, hash symbols, and whitespace into option names. Attackers can inject malicious option names like 'sshCommand = touch /tmp/RCE #' to execute arbitrary commands via core.sshCommand or core.hooksPath on the next git operation.

    • Update to 3.1.58
    Published Updated
  13. CVE-2026-76220

    High · CVSS 8.7EPSS 0.91%Fix available

    GitPython before 3.1.58 Command Execution via split_single_char_options

    GitPython before 3.1.58 contains a command execution vulnerability in the check_unsafe_options guard that can be bypassed by combining a single-character kwarg with split_single_char_options=False. Attackers can supply a crafted kwargs dictionary to guarded methods like clone_from to emit a joined token parsed as --upload-pack, enabling arbitrary OS command execution at default allow_unsafe_options=False.

    • Update to 3.1.58
    Published Updated
  14. CVE-2026-76219

    High · CVSS 7.2EPSS 0.54%Fix available

    GitPython before 3.1.58 Arbitrary File Overwrite via read-tree

    GitPython versions before 3.1.58 contain an arbitrary file overwrite vulnerability in IndexFile.from_tree, IndexFile.reset, and IndexFile.merge_tree methods that append caller-influenced treeish strings to git read-tree without option validation or argument separation. Attackers can inject the --index-output option to overwrite arbitrary files with a valid git-index blob, destroying existing file content at attacker-controlled writable paths.

    • Update to 3.1.58
    Published Updated
  15. CVE-2026-76218

    High · CVSS 7.7EPSS 0.83%Fix available

    GitPython before 3.1.58 Remote Code Execution via Repo.init

    GitPython before 3.1.58 contains a remote code execution vulnerability in Repo.init that forwards unsafe git options without validation. Attackers can supply a template parameter pointing to a directory with malicious git hooks that execute arbitrary code when git operations are performed on the initialized repository.

    • Update to 3.1.58
    Published Updated
  16. CVE-2026-76217

    High · CVSS 7.1EPSS 0.41%Fix available

    GitPython before 3.1.58 Arbitrary File Read via pathspec-from-file

    GitPython versions before 3.1.58 fail to validate options passed to git rm and git checkout commands in IndexFile.remove() and Head.checkout(). Attackers can supply --pathspec-from-file and --pathspec-file-nul parameters to read arbitrary files accessible to the process, with full file contents returned in GitCommandError.stderr.

    • Update to 3.1.58
    Published Updated
  17. CVE-2026-73625

    High · CVSS 8.7EPSS 0.92%Fix available

    GitPython before 3.1.54 Remote Code Execution via kwarg value smuggling

    GitPython versions before 3.1.54 contain a remote code execution vulnerability in the check_unsafe_options guard that can be bypassed by smuggling git options inside single-character kwarg values. Attackers can supply crafted option dictionaries to clone_from, fetch, pull, push, ls_remote, iter_commits, blame, or archive methods to execute arbitrary OS commands via the --upload-pack parameter.

    • Update to 3.1.54
    Published Updated
  18. CVE-2026-73624

    High · CVSS 7.2EPSS 0.55%Fix available

    GitPython before 3.1.54 Arbitrary File Overwrite via diff

    GitPython versions before 3.1.54 contain an arbitrary file overwrite vulnerability in the Diffable.diff method that fails to validate git options passed through kwargs. Attackers can supply the --output argument via the other parameter or output kwarg to write patch content to attacker-chosen file paths at process privilege level.

    • Update to 3.1.54
    Published Updated
  19. CVE-2026-73623

    High · CVSS 7.7EPSS 0.83%Fix available

    GitPython before 3.1.54 Remote Code Execution via --template

    GitPython before 3.1.54 contains an incomplete denylist in unsafe_git_clone_options that omits --template, allowing attackers to achieve arbitrary command execution during clone operations. Attackers can supply --template pointing to a directory containing malicious post-checkout hooks that execute when git clones the repository.

    • Update to 3.1.54
    Published Updated
  20. CVE-2026-73622

    High · CVSS 8.7EPSS 0.51%Fix available

    GitPython before 3.1.55 Environment Variable Exfiltration via Remote.add()

    GitPython before 3.1.55 fails to disable environment variable expansion in Remote.create() and Submodule.add() URL handling, allowing attackers to exfiltrate secrets by supplying URLs containing variable references. Attackers can craft URLs with environment variable tokens that are expanded into .git/config and .gitmodules, then transmitted to attacker-controlled hosts during fetch or pull operations.

    • Update to 3.1.55
    Published Updated

Check your server

Check your installed stack and versions against the current vulnerability feeds.

Check your server →