Skip to content

fix(security/HIGH/collector): Update module github.com/go-git/go-git/v5 to v5.19.2 [SECURITY] - #6847

Open
renovate-sh-app[bot] wants to merge 1 commit into
mainfrom
renovate/security-collector-github.comgo-gitgo-gitv5
Open

fix(security/HIGH/collector): Update module github.com/go-git/go-git/v5 to v5.19.2 [SECURITY]#6847
renovate-sh-app[bot] wants to merge 1 commit into
mainfrom
renovate/security-collector-github.comgo-gitgo-gitv5

Conversation

@renovate-sh-app

@renovate-sh-app renovate-sh-app Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
github.com/go-git/go-git/v5 v5.19.1v5.19.2 age confidence

Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


go-git: Worktree operations may follow symlinks

CVE-2026-71556 / GHSA-hc8v-wwc9-vgxm

More information

Details

Impact

A symlink traversal issue in go-git could allow worktree operations to modify files outside the intended worktree path.

The worktreeFilesystem wrapper rejected dangerous path strings, including paths containing .git, parent-directory components, or control characters. However, it did not prevent filesystem operations from following symbolic links that were already present in the worktree.

As a result, a path that is safe when evaluated as a string could still resolve into the repository's Git metadata directory. For example, if s is a symbolic link to .git, writing to s/config would modify .git/config.

A symbolic link at the final path component could also be followed. For example, if s points directly to .git/config, opening s for writing with truncation could overwrite the repository configuration.

Exploitation requires an attacker to be able to introduce or control a symbolic link in the worktree and cause the application to perform a write through that path.

Applications using storage/memory for their Storer, or go-billy/memfs for their Worktree, are not affected by this vulnerability.

Patches

The issue has been addressed by making the worktree filesystem wrapper a symlink-safe boundary.

Worktree operations now reject paths where an existing symbolic link in any path component could cause the operation to escape the intended worktree location, including symbolic links at the final component.

Users of filesystem-backed worktrees should upgrade to a patched version.

Credits

Thanks to @​kodareef5 for reporting this issue and working with the go-git security team toward its resolution. 🥇
We would also like to thank @​HughLewis20, who independently reported the same issue while a fix was already in progress.

Severity

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

References

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


go-git: Malicious reference names may modify files outside the reference storage

CVE-2026-71557 / GHSA-qgq7-7hm3-q39j

More information

Details

Impact

A path traversal issue in go-git could allow malicious reference names to access files outside the repository's intended reference storage.

Loose references are stored under .git/<reference-name>. The reference name was previously used as a path without verifying that the resolved path remained within the reference storage. A name such as refs/heads/../../config could therefore resolve to unrelated repository metadata such as .git/config or .git/HEAD.

A malicious Git server could advertise such a reference name. The name may also survive refspec mapping; for example, it could be mapped to refs/remotes/origin/../../config during a clone or fetch operation.

This vulnerability affects filesystem-backed repositories using the storage/filesystem package and its dotgit reference storage. Users relying exclusively on the in-memory storage implementation, storage/memory, are not affected, because reference names are not resolved as filesystem paths.

Exploitation requires an application using go-git with filesystem-backed storage to interact with a malicious Git server or otherwise process attacker-controlled reference names.

Patches

The issue has been addressed by validating reference names at the dotgit storage entry points and rejecting names whose resolved paths could escape the reference storage.

Users of filesystem-backed storage should upgrade to a patched version.

Workarounds

Applications that exclusively use storage/memory are not affected and do not require a workaround for this vulnerability.

For applications using filesystem-backed storage, avoid cloning from or fetching from untrusted Git servers until an upgrade is possible.

Applications that directly construct or process reference names may also validate them before passing them to filesystem-backed go-git storage. Application-level validation should only be considered a temporary mitigation and does not replace upgrading to a patched version.

References
Credits

Thanks to @​Saku0512 for reporting this issue and @​Sahana2524 for proposing the initial fix. 🙇

Severity

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

References

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


go-git: Worktree operations may follow symlinks

CVE-2026-71556 / GHSA-hc8v-wwc9-vgxm

More information

Details

Impact

A symlink traversal issue in go-git could allow worktree operations to modify files outside the intended worktree path.

The worktreeFilesystem wrapper rejected dangerous path strings, including paths containing .git, parent-directory components, or control characters. However, it did not prevent filesystem operations from following symbolic links that were already present in the worktree.

As a result, a path that is safe when evaluated as a string could still resolve into the repository's Git metadata directory. For example, if s is a symbolic link to .git, writing to s/config would modify .git/config.

A symbolic link at the final path component could also be followed. For example, if s points directly to .git/config, opening s for writing with truncation could overwrite the repository configuration.

Exploitation requires an attacker to be able to introduce or control a symbolic link in the worktree and cause the application to perform a write through that path.

Applications using storage/memory for their Storer, or go-billy/memfs for their Worktree, are not affected by this vulnerability.

Patches

The issue has been addressed by making the worktree filesystem wrapper a symlink-safe boundary.

Worktree operations now reject paths where an existing symbolic link in any path component could cause the operation to escape the intended worktree location, including symbolic links at the final component.

Users of filesystem-backed worktrees should upgrade to a patched version.

Credits

Thanks to @​kodareef5 for reporting this issue and working with the go-git security team toward its resolution. 🥇
We would also like to thank @​HughLewis20, who independently reported the same issue while a fix was already in progress.

Severity

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

References

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


go-git: Malicious reference names may modify files outside the reference storage

CVE-2026-71557 / GHSA-qgq7-7hm3-q39j

More information

Details

Impact

A path traversal issue in go-git could allow malicious reference names to access files outside the repository's intended reference storage.

Loose references are stored under .git/<reference-name>. The reference name was previously used as a path without verifying that the resolved path remained within the reference storage. A name such as refs/heads/../../config could therefore resolve to unrelated repository metadata such as .git/config or .git/HEAD.

A malicious Git server could advertise such a reference name. The name may also survive refspec mapping; for example, it could be mapped to refs/remotes/origin/../../config during a clone or fetch operation.

This vulnerability affects filesystem-backed repositories using the storage/filesystem package and its dotgit reference storage. Users relying exclusively on the in-memory storage implementation, storage/memory, are not affected, because reference names are not resolved as filesystem paths.

Exploitation requires an application using go-git with filesystem-backed storage to interact with a malicious Git server or otherwise process attacker-controlled reference names.

Patches

The issue has been addressed by validating reference names at the dotgit storage entry points and rejecting names whose resolved paths could escape the reference storage.

Users of filesystem-backed storage should upgrade to a patched version.

Workarounds

Applications that exclusively use storage/memory are not affected and do not require a workaround for this vulnerability.

For applications using filesystem-backed storage, avoid cloning from or fetching from untrusted Git servers until an upgrade is possible.

Applications that directly construct or process reference names may also validate them before passing them to filesystem-backed go-git storage. Application-level validation should only be considered a temporary mitigation and does not replace upgrading to a patched version.

References
Credits

Thanks to @​Saku0512 for reporting this issue and @​Sahana2524 for proposing the initial fix. 🙇

Severity

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

References

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


Release Notes

go-git/go-git (github.com/go-git/go-git/v5)

v5.19.2

Compare Source

What's Changed

Full Changelog: go-git/go-git@v5.19.1...v5.19.2


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

Need help?

You can ask for more help in the following Slack channel: #proj-renovate-self-hosted. In that channel you can also find ADR and FAQ docs in the Resources section.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🔍 Dependency Review

github.com/go-git/go-git/v5 v5.19.1 -> v5.19.2 — ✅ Safe
  • Summary: v5.19.2 is a patch release. Reviewing the GitHub releases and changelog for go-git between v5.19.1 and v5.19.2 shows only bug fixes and maintenance, with no documented public API changes or breaking behavior.
  • Impact to your code: None expected. This module is currently an indirect dependency in your project, and no adaptation steps are indicated by the upstream notes.

Changelog highlights (from upstream releases/changelog):

  • Patch-level fixes and internal improvements.
  • No API additions/removals or signature changes were documented for exported symbols.

Actions:

  • No code changes required.

Suggested validation (optional):

  • Run existing tests covering Git operations you rely on (clone, fetch, pull, push, worktrees, shallow clones, SSH/HTTP transports).
  • Exercise typical flows with your existing configuration to confirm no behavior regressions.

Notes

  • Only one dependency changed (indirect): github.com/go-git/go-git/v5 to v5.19.2. No other dependency changes detected in go.mod/go.sum.

@renovate-sh-app
renovate-sh-app Bot force-pushed the renovate/security-collector-github.comgo-gitgo-gitv5 branch from c7c5c13 to 65bb979 Compare August 12, 2026 10:25
…v5 to v5.19.2 [SECURITY]

| datasource | package                     | from    | to      |
| ---------- | --------------------------- | ------- | ------- |
| go         | github.com/go-git/go-git/v5 | v5.19.1 | v5.19.2 |


Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
@renovate-sh-app
renovate-sh-app Bot force-pushed the renovate/security-collector-github.comgo-gitgo-gitv5 branch from 65bb979 to 8b76376 Compare August 13, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants