-Infinity
0
Severity
8
AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. Prior to 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1, 2.55.1, and 2.56.1, an attacker-controlled repository hosted by the attacker rather than on a normal forge site can exploit git clone --recurse-submodules by causing Git to overwrite a submodule gitfile with a symbolic link. The symbolic link can point to a directory containing attacker-controlled Git configuration or hooks, allowing those hooks or configuration to execute code on the cloning user's system. The issue requires the recursive-submodule option, and users should avoid cloning repositories from untrusted sources. This issue is fixed in versions 2.50.2, 2.51.3, 2.52.1, 2.53.1, 2.54.1, 2.55.1, and 2.56.1.

First published (updated )

Team,

The Git project released new versions on November 10th, 2026, addressing six vulnerabilities. All supported platforms are affected in one way or another, and all Git versions back to v2.27.0 are affected. Versions older than v2.50 are also affected but are no longer serviced by maintenance releases. The fixed versions are: v2.50.2, v2.51.3, v2.52.1, v2.53.1, v2.54.1, v2.55.1, and v2.56.1.

Link to the announcement:

https://lore.kernel.org/git/xmqqh5hosgw5.fsf@gitster.g/

We highly recommend to upgrade.

The addressed issues are:

CVE-2026-111760: Recursive clones can lead to remote code execution.

A cache entry's name length is stored in the 32-bit cenamelen field but computed as sizet. A crafted tree can build a path of the form .gitz/z...z/z with 2^32 bytes following the .git, so that cenamelen wraps to 4. Git's path-safety validation walks the whole NUL-terminated name and finds nothing wrong with .gitz/z...z/z. But checkout writes the path from cenamelen, i.e. only the first 4 bytes. Thus Git writes the validated path .gitz/z...z/z as .git. If the entry is a symlink, checking out the tree tries to overwrite .git with a potentially malicious symlink. While cloning, Git refuses to replace a .git directory with a symlink. But a freshly cloned submodule's .git is a gitfile rather than a directory, so the symlink is written. The target of that symlink holds the hooks or config that may then run attacker-specified code.

Trigger: an attacker-controlled repository (hosted by the attacker, not on a normal forge) cloned with git clone --recurse-submodules. As far as we know, this is currently only triggerable when --recurse-submodules is used. Such a repository fails the LARGEPATHNAME and TREENOTSORTED fsck checks and therefore cannot easily be pushed to the major forges. That does not protect downstream users, as an innocuous-looking .gitmodules pointing to the malicious repository suffices.

CVE-2026-113408: Malformed unborn HEAD advertised by a server.

In the protocol v2 ls-refs response the client copies the symref-target verbatim into .git/HEAD and passes advertised refs straight to allocref(). A server can advertise HEAD as a symref to refs/heads/../../../TARGET. When the user then runs git commit, HEAD resolves to that value. With the files ref backend, Git then writes the ref to .git/refs/heads/../../../TARGET, i.e. to TARGET in the root of the repository.

Trigger: a malicious or otherwise untrusted server plus a client clone over protocol v2. The file is written when a later operation resolves and updates the malformed ref.

CVE-2026-114467: More than two GPG signatures in a commit message.

When Git strips the GPG signatures from a commit message, it only accounts for two signatures. removesignature() stores the start/end positions of signatures in a fixed-size stack array. A commit message containing more than two signatures makes it write past the end of that array and corrupt stack memory. This makes for a denial-of-service attack that can potentially also affect forges. When such a tag is pushed to a remote and a merge action is initiated there, the forge runs the same code.

Trigger: a tag object whose message carries more than two (e.g. PGP) signatures, merged with git merge. That runs removesignature() and corrupts the stack.

CVE-2026-114469: Binary patch size check bypass.

Git rejects patches larger than roughly 1 GiB, because its patch application code does not work well with large files. But that check only considered the size of the patch as it appears in the input. For binary patches, that size is much smaller than the size of the file the patch describes, because binary patches are compressed and encoded. A binary patch that inflates to a very large size therefore slipped past the check. It then crashed Git with an out-of-bounds read in patchdelta(), when the truncated delta size exceeded the real buffer length.

Trigger: applying an attacker-supplied patch (e.g. git apply) that contains a binary diff which inflates far beyond 1 GiB.

CVE-2026-105437: Heap buffer overflow in the three-way merge code.

When merging, Git computes the size of the buffer holding the merge result in a way that can overflow for very large merges. A large number of conflicts combined with a large conflict-marker-size can trigger this. The resulting buffer can then be too small, and Git writes past its end (and, before and after that, before its start), corrupting the heap. In detail, libxdiff kept the merge output size in long/int variables and fed it to malloc(). The xdlfillmergebuffer() function then accumulates the output size in an int, allocates that much, and then writes each piece at dest + size. conflict-marker-size comes from .gitattributes, accepts any positive int, and is added several times per conflict. If the sum goes negative, malloc() gets a huge sizet and fails. That is a spurious error, not exploitable. If the sum wraps back to a small positive value, malloc() succeeds with a too-small buffer. Each added value is below 2^31, so the running offset passes through negative values on the way. The writes therefore first run past the end of the buffer and then land before its start.

Trigger: any command performing a textual three-way merge, i.e. git-merge, git-rebase, git-cherry-pick, and git-merge-tree. The latter is the likely target for forges, which may use it server-side to check mergeability. When the server reads attributes from trees (e.g. via attr.tree or --attr-source), anybody who can push branches and request a merge (e.g. open a pull/merge request) can trigger it. The amount of pushed data needed is small, because the oversized output only appears during the merge. A committed .gitattributes with a huge conflict-marker-size plus a file with many separate conflicts is enough. On GitLab this could be escalated further, to remote code execution via the Git process that Gitaly spawns for mergeability checks.

CVE-2026-114466: fast-import's rewrite-submodules features and export-pack-edges option allowed arbitrary file access.

In response to CVE-2019-1348, fast-import disallows the export-marks feature by default, because it gave arbitrary filesystem read/write access. The features rewrite-submodules-to and rewrite-submodules-from as well as the option export-pack-edges, introduced in the meantime, also allow reading from arbitrary paths. They are therefore now also disallowed by default. Concretely, the rewrite-submodules features take a file argument and can read arbitrary files. Given an unsuitable file, they fail with fatal: corrupt mark line: followed by that file's content. This leaks the content in the error message. Separately, export-pack-edges takes a file name and makes fast-import open it in append mode and write pack-edge records to it. The file is created even without any commits. With a commit plus transfer.unpackLimit=0, attacker-controlled data can be written into it. Both are now gated behind the existing --allow-unsafe-features option. This is a backwards-incompatible change. But, as with the earlier export-marks/import-marks change, the features are otherwise only useful to import/export remote helpers, so the impact should be minimal.

Trigger: feeding untrusted fast-import streams (e.g. git fast-import on input from an untrusted source) that use those features or options.

Credit for finding the vulnerabilities goes to Robert Chen (CVE-2026-111760), Luke Martin (CVE-2026-113408), and pwn2addr (CVE-2026-114466, CVE-2026-114467, CVE-2026-114469). Credit for fixing goes to Elijah Newren, with help from Johannes Schindelin and Jeff King and co-authored and reviewed by Toon Claes (CVE-2026-111760), Toon Claes (CVE-2026-113408), Karthik Nayak (CVE-2026-114466, CVE-2026-114467, CVE-2026-114469), and Kaartic Sivaraam, based on a patch by Jeff King, with help from Toon Claes and Christian Couder (CVE-2026-105437).

Ciao, Johannes

Severity
7

Certain fast-import features can access arbitrary paths and are now disallowed by default.

First published (updated )
Severity
7.5
Buffer Overflow
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected versions of Git have a heap buffer overflow in the three-way merge code (xdiff), which an attacker can trigger through a repository they control.

When Git merges a file, it first adds up the size of the merged output, allocates a buffer of that size, and then writes the output into it. That total was kept in a 32-bit signed integer. The conflict-marker-size attribute, which can be set from a committed .gitattributes file, accepts any positive integer, and the markers are written several times for every conflict. A small file with a huge marker size and many separate conflicts can therefore push the total past 4 GiB, so the integer wraps to a small value and Git writes attacker-controlled merge output past the end of a buffer that is too small. At minimum this crashes Git, and because the overflow is large and its contents are largely attacker-controlled, worse heap corruption is possible.

Any command that does a textual three-way merge can trigger it, such as git-merge(1), git-rebase(1), git-cherry-pick(1), and git-merge-tree(1). The latter is most likely a target for Git forges, which might use git-merge-tree(1) on the server-side to check mergeability. When the server reads attributes from trees in the repository (for example through attr.tree or --attr-source), any user who can push branches and request that they be merged (for example by opening a pull or merge request) can trigger the overflow without anyone else doing anything, and the data they push is small because the oversized output only appears during the merge.

The problem has been patched by computing the size as sizet and checking every addition for overflow, so Git stops with an error instead of overflowing.

Servers that cannot upgrade right away can add

conflict-marker-size=7

to each repository's info/attributes as a workaround, which overrides any in-tree .gitattributes, or turn off server-side mergeability checks for untrusted repositories.

1 / 5
Source: OSV
First published (updated )
Severity
4

Removing more than two GPG signatures from commit messages can corrupt stack memory, potentially causing denial of service during merges.

First published (updated )
Severity
4

A server can advertise a malformed unborn HEAD, causing unintended file writes during subsequent ref updates with the files ref backend.

First published (updated )
Severity
7

Recursive clones can lead to remote code execution through unsafe handling of submodule-related repository metadata.

First published (updated )

Regards, -- l=2001;main(i){float o,O,,I,D;for(;O=I=l/571.-1.75,l;)for(putchar(--l%80? i:10),o=D=l%80.05-2,i=31;=OO,O=2oO+I,o=oo-+D,o++<4+D&i++<87;);puts (" Harry 'Piru' Sintonen <sintonen () iki fi> https://www.iki.fi/sintonen";);}

Severity
7.3
AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H

OpenAI Codex CLI for Windows, macOS, and Linux and Codex Desktop for Windows and macOS automatically collected Git repository metadata without disabling the repository-local core.fsmonitor setting. If a user opens or uses an attacker-prepared repository whose preserved .git/config sets core.fsmonitor to an attacker-controlled filesystem-monitor helper, Git can execute that helper while Codex collects repository metadata. The helper runs outside Codex's command sandbox and without a user-approval prompt, allowing attacker-controlled code to run with the user's privileges. The code can read, change, or delete the user's files and access other resources available to the user's account. An ordinary Git clone does not preserve the source repository's local .git/config; exploitation requires a repository delivered or copied with that configuration intact.

First published (updated )
Severity
7.4
Infoleak
AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N

Git for Windows is the Windows port of Git. Prior to 2.55.0.windows.4, a malicious remote Git server can advertise a bundle URI that reaches transportgetremotebundleuri(), fetchbundleuriinternal(), and copyuritofile() in bundle-uri.c during clone or fetch when transfer.bundleuri=true. Non-HTTP(S) values are treated as local filesystem paths, and file URI prefixes are removed, so a bare UNC path or file URI targeting an attacker-controlled share causes Windows to initiate an outbound SMB connection. This can expose NTLM authentication material to the attacker-selected host. This issue is fixed in version 2.55.0.windows.4.

First published (updated )
Severity
8.6
AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Impact

When populating a Git repository's working tree with the contents of Git LFS objects, certain Git LFS commands may write to files visible outside the current Git working tree if symbolic or hard links exist which collide with the paths of files tracked by Git LFS.

Git LFS has resolved this problem by revising the git lfs checkout and git lfs pull commands so that they check for symbolic links in the same manner as performed by Git before writing to files in the working tree. These commands now also remove existing files in the working tree before writing new files in their place.

As well, Git LFS has resolved a problem whereby the git lfs checkout and git lfs pull commands, when run in a bare repository, could write to files visible outside the repository. While a specific and relatively unlikely set of conditions were required for this to occur, it is no longer possible under any circumstances.

Patches

This problem exists in all versions since 0.5.2 and is patched in v3.7.1. All users should upgrade to v3.7.1.

Workarounds

Support for symlinks in Git may be disabled by setting the core.symlinks configuration option to false, after which further clones and fetches will not create symbolic links. However, any symbolic or hard links in existing repositories will still provide the opportunity for Git LFS to write to their targets.

References

- https://github.com/git-lfs/git-lfs/security/advisories/GHSA-6pvw-g552-53c5 - https://nvd.nist.gov/vuln/detail/CVE-2025-26625 - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-26625 - https://github.com/git-lfs/git-lfs/releases/tag/v3.7.1 - git-lfs/git-lfs@5c11ffce9a - git-lfs/git-lfs@0cffe93176 - git-lfs/git-lfs@d02bd13f02

For more information

If there are any questions or comments about this advisory: For general questions, start a discussion in the Git LFS discussion forum. For reports of additional vulnerabilities, please follow the Git LFS security reporting policy.

1 / 2
Source: GitHub
First published (updated )

The flaw, tracked as CVE-2025-48384 (CVSS score of 8.1), is described as an arbitrary file write during the cloning of repositories with submodules that use a ‘recursive’ flag.

The issue exists because, when reading configuration values, Git strips trailing carriage return (CR) characters and does not quote them when writing.

Thus, the initialization of submodules with a path containing a trailing CR results in altered paths and in the submodule being checked out to an incorrect location.

“If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout,” Git’s advisory reads.

https://lore.kernel.org/git/xmqq5xg2wrd1.fsf@gitster.g

First published (updated )
Social
reddit

https://www.helpnetsecurity.com/2025/08/26/git-vulnerability-exploited-cve-2025-48384/

First published (updated )
Social
reddit
Severity
1

Git GUI allows you to use the Git source control management tools via a GUI. When a user clones an untrusted repository and is tricked into editing a file located in a maliciously named directory in the repository, then Git GUI can create and overwrite files for which the user has write permission. This vulnerability is fixed in 2.43.7, 2.44.4, 2.45.4, 2.46.4, 2.47.3, 2.48.2, 2.49.1, and 2.50.1.

First published (updated )
Severity
8.6
OS Command Injection
AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Gitk is a Tcl/Tk based Git history browser. Starting with 2.41.0, a Git repository can be crafted in such a way that with some social engineering a user who has cloned the repository can be tricked into running any script (e.g., Bourne shell, Perl, Python, ...) supplied by the attacker by invoking gitk filename, where filename has a particular structure. The script is run with the privileges of the user. This vulnerability is fixed in 2.43.7, 2.44.4, 2.45.4, 2.46.4, 2.47.3, 2.48.2, 2.49.1, and 2.50.

First published (updated )
Severity
4

A Git repository can be crafted in such a way that a user who has cloned the repository can be tricked into running any script supplied by the attacker by invoking gitk filename, where filename has a particular structure.

First published (updated )
Severity
4

When a user clones an untrusted repository and runs Gitk without additional command arguments, any writable file can be created and truncated. The option "Support per-file encoding" must have been enabled. The operation "Show origin of this line" is affected as well, regardless of the option being enabled or not.

First published (updated )
Severity
7

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout. This vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1.

First published (updated )
Severity
7

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When cloning a repository Git knows to optionally fetch a bundle advertised by the remote server, which allows the server-side to offload parts of the clone to a CDN. The Git client does not perform sufficient validation of the advertised bundles, which allows the remote side to perform protocol injection. This protocol injection can cause the client to write the fetched bundle to a location controlled by the adversary. The fetched content is fully controlled by the server, which can in the worst case lead to arbitrary code execution. The use of bundle URIs is not enabled by default and can be controlled by the bundle.heuristic config option. Some cases of the vulnerability require that the adversary is in control of where a repository will be cloned to. This either requires social engineering or a recursive clone with submodules. These cases can thus be avoided by disabling recursive clones. This vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1.

First published (updated )
Severity
8
AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout. This vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1.

First published (updated )
Severity
8
AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. When reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout. This vulnerability is fixed in v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, v2.49.1, and v2.50.1.

First published (updated )

The Git project released new versions of Git today, July 8, 2025, addressing multiple security vulnerabilities. Those vulnerabilities are: CVE-2025-27613, CVE-2025-27614, CVE-2025-46334, CVE-2025-46835, CVE-2025-48384, CVE-2025-48385, and CVE-2025-48386.

The new versions are v2.43.7, v2.44.4, v2.45.4, v2.46.4, v2.47.3, v2.48.2, and v2.49.1. Many previous versions older than <= v2.50.0 are affected.

The announcement from the Git project's mailing list may be found at:

https://lore.kernel.org/git/xmqq5xg2wrd1.fsf@gitster.g/

We recommend upgrading. The addressed issues are as follows:

CVE-2025-27613, Gitk:

When a user clones an untrusted repository and runs Gitk without additional command arguments, any writable file can be created and truncated. The option "Support per-file encoding" must have been enabled. The operation "Show origin of this line" is affected as well, regardless of the option being enabled or not.

CVE-2025-27614, Gitk:

A Git repository can be crafted in such a way that a user who has cloned the repository can be tricked into running any script supplied by the attacker by invoking gitk filename, where filename has a particular structure.

CVE-2025-46334, Git GUI (Windows only):

A malicious repository can ship versions of sh.exe or typical textconv filter programs such as astextplain. On Windows, path lookup can find such executables in the worktree. These programs are invoked when the user selects "Git Bash" or "Browse Files" from the menu.

CVE-2025-46835, Git GUI:

When a user clones an untrusted repository and is tricked into editing a file located in a maliciously named directory in the repository, then Git GUI can create and overwrite any writable file.

CVE-2025-48384, Git:

When reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout.

CVE-2025-48385, Git:

When cloning a repository Git knows to optionally fetch a bundle advertised by the remote server, which allows the server-side to offload parts of the clone to a CDN. The Git client does not perform sufficient validation of the advertised bundles, which allows the remote side to perform protocol injection.

This protocol injection can cause the client to write the fetched bundle to a location controlled by the adversary. The fetched content is fully controlled by the server, which can in the worst case lead to arbitrary code execution.

CVE-2025-48386, Git:

The wincred credential helper uses a static buffer (target) as a unique key for storing and comparing against internal storage. This credential helper does not properly bounds check the available space remaining in the buffer before appending to it with wcsncat(), leading to potential buffer overflows.

Credit for discovering CVEs 2025-48384, 48385, and 48386 goes to David Leadbeater. Credit for fixing the first two CVEs goes to Justin Tobler, and Patrick Steinhardt, respectively. Credit for fixing the third CVE is shared between Taylor Blau, and Jeff King.

Credit for finding and fixing CVE-2025-46835 goes to Johannes Sixt. Mark Levedahl discovered and fixed CVE-2025-46334. Avi Halachmi discovered both CVE-2025-27613 and CVE-2025-27614, and fixed the latter. CVE-2025-27613 was fixed by Johannes Sixt.

Thanks, Taylor

First published (updated )
Severity
8.1
AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:H/A:H

CVE-2025-48384 is regarding a vulnerability in Git where when reading a config value, Git strips any trailing carriage return and line feed (CRLF). When writing a config entry, values with a trailing CR are not quoted, causing the CR to be lost when the config is later read. When initializing a submodule, if the submodule path contains a trailing CR, the altered path is read resulting in the submodule being checked out to an incorrect location. If a symlink exists that points the altered path to the submodule hooks directory, and the submodule contains an executable post-checkout hook, the script may be unintentionally executed after checkout. GitHub created this CVE on their behalf. The documented Visual Studio updates incorporate updates in Git which address this vulnerability. Please see CVE-2025-48384 for more information.

1 / 7
Source: Microsoft
First published (updated )

Hi,

On Tue, Jan 14, 2025 at 07:02:40PM +0100, Johannes Schindelin wrote: Team,

The Git project released new security bug-fix versions today, January 14th, 2025: v2.48.1, v2.47.1, v2.46.3, v2.45.3, v2.44.3, v2.43.6, v2.42.4, v2.41.3, and v2.40.4. Small heads-up here: I think in the above version listing it should be v2.47.2 instead. The other versions are correct.

Regards, Salvatore

First published (updated )

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203