Skip to content

Update dependency isomorphic-git to v1.38.6 [SECURITY] - #86

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-isomorphic-git-vulnerability
Open

renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-isomorphic-git-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Nov 10, 2026

Copy link
Copy Markdown

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
isomorphic-git (source) 1.7.4 → 1.38.6 age confidence

Directory Traversal in isomorphic-git

CVE-2021-30483 / GHSA-fgxq-p49f-qw99

More information

Details

isomorphic-git before 1.8.2 allows Directory Traversal via a crafted repository.

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


isomorphic-git: Arbitrary file write outside of working tree via directory symlink during checkout (potential RCE)

CVE-2026-63395 / GHSA-9qw7-j9xw-fv9c

More information

Details

Summary

git.checkout writes working-tree files through a directory symlink without checking the leading path, so a malicious repository can write outside the intended working directory. The defect is in isomorphic-git's checkout logic itself and is therefore independent of the fs provider. The impact depends on the configured filesystem; worst case is arbitrary file write on the host, e.g. injecting an attacker key into ~/.ssh/authorized_keys → remote login / code execution.

Details

A single git tree can't hold a name as both a symlink and a directory, so the attack uses two states:

Commit N:    config            (mode 120000, symlink → ../.ssh)
Commit N+1:  config/           (mode 040000, tree)
               authorized_keys (mode 100644, attacker public key)

Checking out commit N writes config as a directory symlink. Checking out commit N+1 sees config/authorized_keys as a new path: isomorphic-git mkdirs the parent (config, already a symlink → EEXIST, ignored) then writeFiles the file, which the OS resolves through the symlink to outside the working directory. A file-level symlink swap is caught (the 120000→100644 mode change triggers an rm), but the directory-level variant is not — the payload is always a new child path, a plain create, so the parent symlink is never removed.

The symlink target is attacker-chosen. Besides ~/.ssh, pointing it at the repo's own control directory — hooks → .git/hooks then hooks/pre-commit, or x → .git then overwriting .git/config (core.hooksPath / alias / core.fsmonitor) — yields RCE on the next native git command without depending on ~/.ssh existing, since .git/ is always present in a fresh clone.

Canonical git behavior (divergence)

git refuses to do this: has_symlink_leading_path() (symlinks.c) checks each leading path component during checkout and will not follow a symlink — the hardening behind CVE-2021-21300 and CVE-2024-32002. isomorphic-git has no equivalent check.

PoC

https://github.com/spiceoverflow/av1-symlink-hook-rce — open in a Codespace; it builds the malicious repo, serves it locally, and runs a victim. Output on Linux:

[AV-1] Directory symlink on disk: …/config → ../.ssh  (→ /home/node/.ssh)
[AV-1] *** SSH KEY INJECTION CONFIRMED ***

Trigger: minimal realistic path is clone (commit N) + a later pull (commit N+1) — ordinary sync of an already-trusted repo. It also collapses to a single clone when the consuming app reads or writes into the cloned tree, or when a symlink already exists on disk.

Impact

isomorphic-git is filesystem-agnostic, so exploitability and blast radius depend on the active fs provider — specifically whether it creates a symlink and follows it on a later write:

  • Node fs on Linux/macOS (servers, CI, CLIs, Electron/desktop tooling — the common server-side use): real OS symlinks → the write lands anywhere the process can reach → arbitrary file write on the host → RCE (the PoC above). Highest impact.
  • Node fs on Windows: fs.symlink typically requires privilege and throws EPERM, so the symlink-plant step usually fails — not exploitable by default. (A property of the OS/provider, not of isomorphic-git.)
  • In-memory / browser providers (memfs, ZenFS, lightning-fs, custom fs): there is no host filesystem to escape to, so the worst case is writing outside the intended clone directory but within that virtual filesystem — i.e. corrupting other repos/app data the same provider holds. Bounded by the sandbox, and only if the provider implements symlink creation + following.

The CVSS above reflects the worst-case (Node fs on a POSIX host). Browser/in-memory-only deployments are lower severity (sandboxed integrity impact).

Suggested fix

Before each working-tree write, lstat every leading path component and refuse to traverse a
symlink (mirrors git's has_symlink_leading_path()); optionally honor core.symlinks=false.

Severity

  • CVSS Score: 8.8 / 10 (High)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


isomorphic-git: Circular symbolic references cause non-terminating resolution (DoS)

CVE-2026-63475 / GHSA-96wc-2m84-2cj7

More information

Details

Summary

A malicious server can advertise circular symref= capabilities (e.g. a → b and b → a). isomorphic-git writes them to disk as loose symrefs, and GitRefManager.resolve() follows them with no depth limit and no cycle detection, so any later operation that resolves one of them (log, status, checkout, branch, …) loops forever — a persistent denial of service from a single clone.

Details

src/managers/GitRefManager.js — resolve() only enforces a depth limit when a depth argument is passed (depth = undefined by default), and has no visited-set:

static async resolve({ fs, gitdir, ref, depth = undefined }) {
  if (depth !== undefined) { depth--; if (depth === -1) return ref }
  …
}

updateRemoteRefs persists all server-supplied symrefs unconditionally. After clone the client has refs/remotes/origin/a → ref: refs/remotes/origin/b and b → a on disk; resolving either never terminates. Because the bad refs live on disk, the repo is effectively bricked for the application.

Canonical git behavior (divergence)

git caps symref resolution at SYMREF_MAXDEPTH = 5 (refs.c): git rev-parse a returns immediately with warning: ignoring dangling symref — no recursion, no hang.

PoC

https://github.com/spiceoverflow/av5-circular-symref — open in a Codespace; clone writes the circular symrefs, then git.log on one never returns (the runner stops it after a 20s hang):

[AV-5] refs/remotes/origin/a contains: ref: refs/remotes/origin/b
[AV-5] refs/remotes/origin/b contains: ref: refs/remotes/origin/a
[run] *** DoS CONFIRMED: resolving a circular symref never terminates ***
Impact

A persistent denial of service via non-terminating symbolic-ref resolution (CWE-674 / CWE-835). After a single clone from a malicious (or MitM'd) server the circular refs are written to disk, so every later operation that resolves them (log, status, checkout, branch, …) hangs forever — the repository becomes effectively unusable for the application.

Impacted: any application that clones from untrusted/compromised remotes with isomorphic-git.

Suggested fix

Add visited-set cycle detection (and/or a default maximum depth, as git does) in GitRefManager.resolve(); optionally validate server-supplied symref targets before persisting.

Severity

  • CVSS Score: 4.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


isomorphic-git: Path traversal via a ".." tree-entry name writes files outside the working directory on clone/checkout

CVE-2026-63478 / GHSA-cw2g-2vwq-88w6

More information

Details

Summary

isomorphic-git's tree parser (src/models/GitTree.js) validates each entry name only against the path separators / and \. It does not reject the standalone reserved name .., so a malicious repository can, on a single clone/checkout, write files outside the working
directory
(unbounded depth). Works on any host-backed fs provider.

Details

The guard is:

// src/models/GitTree.js
if (path.includes('\\') || path.includes('/')) {
  throw new UnsafeFilepathError(path)
}

The standalone string .. passes. isomorphic-git assembles the full path incrementally across tree levels, so nesting .. trees yields ../escaped.txt, ../../escaped.txt, … with unbounded depth (each level is a separate tree object that passes the per-entry guard). On checkout mkdir(workdir/..) hits EEXIST (ignored) and the file is written above the working directory. Depth is chosen to reach the home dir, /etc, /tmp, etc.; overwriting a shell rc / config / startup file can escalate to code execution.

Canonical git behavior (divergence)

git rejects this via verify_path(): git read-tree fails with error: invalid path '../escaped.txt' and git fsck flags warning … hasDotdot: contains '..'. (git's verify_path also rejects . and .git, the latter flagged by fsck as hasDotgit — see the fix note below.) GitHub runs fsck on push, so such a tree can't be hosted there; reach is limited to a self-hosted/Smart-HTTP remote or a MitM.

PoC

https://github.com/spiceoverflow/av2-dotdot-traversal — open in a Codespace; a single git.clone() from the bundled server writes escaped.txt one directory above the clone target (DEPTH=N escapes N levels):

[AV-2] *** PATH TRAVERSAL CONFIRMED ***
[AV-2] File written outside workdir: …/escaped.txt
Impact

A path-traversal arbitrary file write outside the working directory (CWE-22), triggered by a single clone/checkout; it can escalate to code execution by overwriting shell rc, config, or startup files.

Any application or user that clones/checks out an untrusted (or compromised / MitM'd) repository with isomorphic-git on a host-backed filesystem (Linux, macOS, or Windows — no symlink or privilege required). Requires a non-GitHub remote (self-hosted / Smart-HTTP) or a MitM, since GitHub's fsck rejects trees containing ...

Suggested fix

In the tree parser, reject any entry name equal to . or ... For full verify_path parity it should also reject .git (case-insensitively, trailing dots/spaces stripped) and the NTFS 8.3 / HFS variants git blocks. Note: a literal .git entry is not independently exploitable via
clone/checkout in current isomorphic-git — the checkout walk skips a .git tree entry (a sibling file is written but the .git entry is not), so rejecting .git is defense-in-depth / git parity rather than a separately demonstrated bug. Additionally, normalize and bounds-check the assembled full path against the working-tree root before any filesystem write.

Severity

  • CVSS Score: 5.3 / 10 (Medium)
  • Vector String: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

isomorphic-git/isomorphic-git (isomorphic-git)

v1.38.6

Compare Source

Bug Fixes

v1.38.5

Compare Source

Bug Fixes

v1.38.4

Compare Source

Bug Fixes

v1.38.3

Compare Source

Bug Fixes

v1.38.2

Compare Source

Bug Fixes

v1.38.1

Compare Source

Bug Fixes

v1.38.0

Compare Source

Bug Fixes
Features

v1.37.9

Compare Source

Bug Fixes

v1.37.8

Compare Source

Bug Fixes

v1.37.7

Compare Source

Bug Fixes
  • browser entrypoint not being used in some non-node build contexts (#​2309) (199714a)

v1.37.6

Compare Source

Bug Fixes
  • checkout surface silent rejections in batchAllSettled (#​2306) (acb2dcd)

v1.37.5

Compare Source

Bug Fixes

v1.37.4

Compare Source

Bug Fixes

v1.37.3

Compare Source

Bug Fixes
  • support git worktrees in discoverGitdir (absolute gitdir paths) (#​2293) (b55bd5f)

v1.37.2

Compare Source

Bug Fixes

v1.37.1

Compare Source

Bug Fixes

v1.37.0

Compare Source

Features

v1.36.3

Compare Source

Bug Fixes

v1.36.2

Compare Source

Bug Fixes

v1.36.1

Compare Source

Bug Fixes

v1.36.0

Compare Source

Features

v1.35.1

Compare Source

Bug Fixes

v1.35.0

Compare Source

Bug Fixes
Features

v1.34.2

Compare Source

Bug Fixes

v1.34.1

Compare Source

Bug Fixes

v1.34.0

Compare Source

Features

v1.33.3

Compare Source

Bug Fixes

v1.33.2

Compare Source

Bug Fixes

v1.33.1

Compare Source

Bug Fixes

v1.33.0

Compare Source

Features

v1.32.3

Compare Source

Bug Fixes

v1.32.2

Compare Source

Bug Fixes

v1.32.1

Compare Source

Bug Fixes

v1.32.0

Compare Source

Features
  • (merge --allow-unrelated-histories) adding parameter to merge unrelated branches (#​2121) (77715e1)

v1.31.1

Compare Source

Bug Fixes

v1.31.0

Compare Source

Features

v1.30.3

Compare Source

Bug Fixes

v1.30.2

Compare Source

Bug Fixes
  • mergeTree returns undefined when a directory in deleted in a branch and updated in the other (#​2062) (0f302a9), closes #​1999

v1.30.1

Compare Source

Bug Fixes

v1.30.0

Compare Source

Features

v1.29.0

Compare Source

Features

v1.28.0

Compare Source

Features

v1.27.3

Compare Source

Bug Fixes
  • The file “index” couldn’t be opened because there is no such file on iOS device (#​1997) (8c81546)

v1.27.2

Compare Source

Bug Fixes
  • refactor: use path.join from stdlib instead of custom join (#​1958) (632f67f)

v1.27.1

Compare Source

Bug Fixes

v1.27.0

Compare Source

Features

v1.26.5

Compare Source

Bug Fixes

v1.26.4

Compare Source

Bug Fixes

v1.26.3

Compare Source

Bug Fixes

v1.26.2

Compare Source

Bug Fixes

v1.26.1

Compare Source

Bug Fixes
  • readObject when reading from packed objects with format wrapped (#​1935) (85bde9d)

v1.26.0

Compare Source

Features

v1.25.10

Compare Source

Bug Fixes

v1.25.9

Compare Source

Bug Fixes

v1.25.8

Compare Source

Bug Fixes

v1.25.7

Compare Source

Bug Fixes
  • handle no-refs response from git-upload-pack for git > 2.41.0 (#​1862) (112eb7a)

v1.25.6

Compare Source

Bug Fixes

v1.25.5

Compare Source

Bug Fixes
  • Add codespell: workflow, config and fix typos it finds (#​1843) (6170171)

v1.25.4

Compare Source

Bug Fixes

v1.25.3

Compare Source

Bug Fixes

v1.25.2

Compare Source

Bug Fixes
  • rethrow error if error is encountered when reading git-upload-pack response (#​1848) (ad9bc11), closes #​1847

v1.25.1

Compare Source

Bug Fixes

v1.25.0

Compare Source

Features

v1.24.5

Compare Source

Bug Fixes

v1.24.4

Compare Source

Bug Fixes

v1.24.3

Compare Source

Bug Fixes

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
renovate Bot requested a review from KSXGitHub as a code owner November 10, 2026 01:52

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants