/

CVE-2026-86017

Severity:

HIGH RISK

(8.0)

Path Traversal (CWE-22) in isomorphic-git Cherry-Pick

CVE-2026-86017

Deferred

Vulnerability type

Category:

Path Traversal via Symbolic Link

CWE:

CWE-22

Impact:

Arbitrary File Write

Severity:

HIGH RISK

(8.0)

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

isomorphic-git could follow a tracked symbolic link outside a worktree when applying changes during a cherry-pick. If a cherry-picked tree places a file beneath that link, attacker-controlled content may be written to the external destination.

Affected context

The issue occurs in isomorphic-git's cherry-pick tree-change handling when a worktree contains a tracked symbolic link pointing outside the worktree. It becomes risky when a cherry-pick applies a file beneath that symlink without checking the path components before writing.

Exploit preconditions

  • Attack surface: A worktree where isomorphic-git performs a cherry-pick
  • Required access: The attacker must be able to influence the tree being cherry-picked, and the victim must have a worktree containing a suitable tracked symlink
  • Trigger point: Applying a cherry-picked file beneath the symlink
  • Why exploitation is possible: The write follows the leading symlink and does not confine the destination to the worktree

Why this happens

The tree-change handling does not verify that path components are not symbolic links before writing files. This allows a path that appears to be inside the worktree to resolve to a location outside it, matching CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').

Potential impact

  • Attacker-controlled content may be written to files outside the worktree
  • Data may be tampered with or deleted, depending on the selected destination
  • Written content could cause code injection if it replaces or alters interpreted files
  • The resulting changes may contribute to privilege escalation, denial of service, or follow-on code execution

General mitigation guidance

Defensive patterns focus on ensuring writes remain confined to the intended worktree and reducing trust in repository-controlled paths.

  • Reject or safely handle paths containing symlinked components before writing
  • Resolve and validate destination paths against the canonical worktree root
  • Use filesystem operations and containment checks that account for symlink changes
  • Treat repository trees and their path metadata as untrusted input
  • Run Git operations with the minimum filesystem permissions needed

How teams detect issues like this

  • Use static analysis to identify file writes that join untrusted paths to a worktree root without symlink-aware containment checks
  • Review cherry-pick and checkout code for validation performed before, rather than after, filesystem path resolution
  • Add tests for tracked symlinks that point outside the worktree and verify that writes cannot escape it
  • Enforce code-review or CI policies requiring path containment checks for filesystem writes

Sources

SourceLink
github.comgithub.com/isomorphic-git/isomorphic-git/commit/4664c8e1147c3c7ba87c027e92093d28607ef4c0
github.comgithub.com/isomorphic-git/isomorphic-git/pull/2377
github.comgithub.com/isomorphic-git/isomorphic-git/releases/tag/v1.38.8
github.comgithub.com/isomorphic-git/isomorphic-git/security/advisories/GHSA-pvh8-4vwp-j58p

Frequently asked

questions

The issue is triggered during a cherry-pick. Exploitation depends on whether an attacker can influence the tree being applied and whether the victim worktree has a suitable tracked symlink.

The attacker must be able to supply or influence cherry-picked content. The victim must also perform the operation in a worktree containing a symlink that points outside it.

Ensure every write destination is confined to the canonical worktree root, accounting for symlinks in all path components.

Treat repository paths as untrusted, test filesystem operations against symlink-based escape cases, and run Git operations with least privilege.

Find out what's already
exploitable in your codebase.