org.mvnpm:isomorphic-git@1.38.4

  • latest version

    1.44.9

  • latest non vulnerable version

  • first published

    8 months ago

  • latest version published

    22 days ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.mvnpm:isomorphic-git package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Infinite loop

    org.mvnpm:isomorphic-git is a pure JavaScript reimplementation of git that works in both Node.js and browser JavaScript environments. It can read and write to git repositories, fetch from and push to git remotes (such as GitHub), all without any native C++ module dependencies.

    Affected versions of this package are vulnerable to Infinite loop via GitRefManager.resolve(), which follows symbolic references with no cycle detection and no default depth limit. A malicious or MitM server can advertise circular symref= capabilities (e.g. a → b and b → a) during a clone; updateRemoteRefs persists these unconditionally to disk as loose symrefs. Any subsequent operation that resolves one of those references (log, status, checkout, branch, etc.) enters an infinite loop, freezing the application and leaving the repository permanently unusable.

    How to fix Infinite loop?

    Upgrade org.mvnpm:isomorphic-git to version 1.38.6 or higher.

    [,1.38.6)
    • H
    Directory Traversal

    org.mvnpm:isomorphic-git is a pure JavaScript reimplementation of git that works in both Node.js and browser JavaScript environments. It can read and write to git repositories, fetch from and push to git remotes (such as GitHub), all without any native C++ module dependencies.

    Affected versions of this package are vulnerable to Directory Traversal via git.checkout, which writes working-tree files through symlinked leading directory components without checking them. A malicious repository can place a directory symlink in one commit and then introduce a child file beneath that path in a subsequent commit; when the consumer checks out the later state, isomorphic-git mkdirs the parent (already a symlink, EEXIST ignored) and then writes the file, which the OS resolves through the symlink to a location outside the working directory. On Node.js with a POSIX filesystem this permits arbitrary host file writes and potential code execution, for example by injecting an attacker-controlled key into ~/.ssh/authorized_keys or overwriting .git/hooks to achieve RCE on the next native git invocation.

    Note: Full arbitrary file write impact requires Node.js fs on Linux or macOS; Node.js on Windows typically blocks the symlink creation step without elevated privilege, and browser or in-memory fs providers are affected only when they implement both symlink creation and following, limiting impact to their virtual filesystem.

    How to fix Directory Traversal?

    Upgrade org.mvnpm:isomorphic-git to version 1.38.6 or higher.

    [,1.38.6)
    • M
    Allocation of Resources Without Limits or Throttling

    org.mvnpm:isomorphic-git is a pure JavaScript reimplementation of git that works in both Node.js and browser JavaScript environments. It can read and write to git repositories, fetch from and push to git remotes (such as GitHub), all without any native C++ module dependencies.

    Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via applyDelta in src/utils/applyDelta.js, which reads a server-controlled targetSize from a packfile delta header and passes it directly to Buffer.alloc(targetSize) with no upper bound. A malicious or MitM-controlled remote can send a single delta header declaring a targetSize of approximately 2 GB, causing git.clone() or git.fetch() to perform that allocation before any validation of the actual delta output. Because GitPackIndex.fromPack swallows the subsequent size-mismatch error, hosts with sufficient memory silently waste the allocated resource, while memory-constrained environments such as containers, serverless functions, and small virtual machines are terminated by the OS. The allocation is off-heap, so Node.js heap limits do not mitigate it.

    How to fix Allocation of Resources Without Limits or Throttling?

    Upgrade org.mvnpm:isomorphic-git to version 1.38.6 or higher.

    [,1.38.6)
    • M
    Directory Traversal

    org.mvnpm:isomorphic-git is a pure JavaScript reimplementation of git that works in both Node.js and browser JavaScript environments. It can read and write to git repositories, fetch from and push to git remotes (such as GitHub), all without any native C++ module dependencies.

    Affected versions of this package are vulnerable to Directory Traversal via the tree parser in src/models/GitTree.js, which validates entry names only against path separators (/ and \) but does not reject the standalone reserved name ... During a clone or checkout from a malicious or MitM-controlled non-GitHub remote, an attacker can nest .. tree entries to assemble paths such as ../escaped.txt or ../../escaped.txt, writing files at arbitrary parent paths outside the working-tree root on any host-backed filesystem. The arbitrary file write can overwrite shell rc, configuration, or startup files and escalate to code execution.

    Note: This is only exploitable against non-GitHub remotes (self-hosted or Smart-HTTP) or via a MitM, because GitHub's fsck rejects trees containing .. entries on push.

    How to fix Directory Traversal?

    Upgrade org.mvnpm:isomorphic-git to version 1.38.6 or higher.

    [,1.38.6)
    • M
    Allocation of Resources Without Limits or Throttling

    org.mvnpm:isomorphic-git is a pure JavaScript reimplementation of git that works in both Node.js and browser JavaScript environments. It can read and write to git repositories, fetch from and push to git remotes (such as GitHub), all without any native C++ module dependencies.

    Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via applyDelta in src/utils/applyDelta.js, which reads a server-controlled targetSize from a packfile delta header and passes it directly to Buffer.alloc(targetSize) with no upper bound. A malicious or MitM-controlled remote can send a single delta header declaring a targetSize of approximately 2 GB, causing git.clone() or git.fetch() to perform that allocation before any validation of the actual delta output. Because GitPackIndex.fromPack swallows the subsequent size-mismatch error, hosts with sufficient memory silently waste the allocated resource, while memory-constrained environments such as containers, serverless functions, and small virtual machines are terminated by the OS. The allocation is off-heap, so Node.js heap limits do not mitigate it.

    How to fix Allocation of Resources Without Limits or Throttling?

    Upgrade org.mvnpm:isomorphic-git to version 1.38.6 or higher.

    [,1.38.6)
    • H
    Prototype Pollution

    org.mvnpm:isomorphic-git is a pure JavaScript reimplementation of git that works in both Node.js and browser JavaScript environments. It can read and write to git repositories, fetch from and push to git remotes (such as GitHub), all without any native C++ module dependencies.

    Affected versions of this package are vulnerable to Prototype Pollution via the getRemoteInfo function. An attacker can manipulate the prototype of objects by advertising crafted ref names containing __proto__ path segments during ref negotiation, which can reroute network operations through an attacker-controlled proxy and result in the transmission of sensitive credentials by invoking the victim's authentication callback when connecting to a malicious server.

    How to fix Prototype Pollution?

    Upgrade org.mvnpm:isomorphic-git to version 1.42.2 or higher.

    [,1.42.2)
    • H
    Directory Traversal

    org.mvnpm:isomorphic-git is a pure JavaScript reimplementation of git that works in both Node.js and browser JavaScript environments. It can read and write to git repositories, fetch from and push to git remotes (such as GitHub), all without any native C++ module dependencies.

    Affected versions of this package are vulnerable to Directory Traversal via tree-entry validation in src/models/GitTree.js, which does not reject the Windows NTFS reserved pathname alias .git::$INDEX_ALLOCATION. When clone() or checkout() materializes an attacker-controlled tree containing this alias on Windows using an NTFS filesystem, the alias resolves to the active .git directory and permits writes to trusted repository metadata instead of a normal worktree directory. A malicious repository or object stream can therefore poison repository configuration, hooks, refs, attributes, or other gitdir state. A later native Git or compatible-tool action, such as processing a poisoned core.fsmonitor value, can execute configured commands as the victim developer or CI identity.

    Note: This is only exploitable on Windows systems using an NTFS filesystem, as non-NTFS systems do not interpret the pathname as the active gitdir.

    How to fix Directory Traversal?

    Upgrade org.mvnpm:isomorphic-git to version 1.38.7 or higher.

    [,1.38.7)
    • H
    Directory Traversal

    org.mvnpm:isomorphic-git is a pure JavaScript reimplementation of git that works in both Node.js and browser JavaScript environments. It can read and write to git repositories, fetch from and push to git remotes (such as GitHub), all without any native C++ module dependencies.

    Affected versions of this package are vulnerable to Directory Traversal via applyTreeChanges in src/utils/walkerToTreeEntryMap.js, which materializes files during git cherry-pick by joining the worktree root with the entry path and writing blob contents without checking whether any leading path component is a symbolic link. If the victim worktree contains a tracked symlink pointing outside the worktree, an attacker who controls a cherry-picked commit can place a file beneath that symlink path, causing the write to follow the symlink and materialize attacker-controlled content at an arbitrary filesystem location. This can enable data tampering, code injection into interpreted files, privilege escalation, or follow-on code execution depending on the target path. The regular checkout path protects against this with assertNoSymlinkInLeadingPath, but that guard was not applied in applyTreeChanges.

    How to fix Directory Traversal?

    Upgrade org.mvnpm:isomorphic-git to version 1.38.9 or higher.

    [,1.38.9)