)]}'
{
  "commit": "c57c052ae8d8486d88f93f983db4439241669c8a",
  "tree": "ce0599b8f630055cb89eb29dc6b4002f1ea82732",
  "parents": [
    "13c7afec212fc97ce257d15601659314c6673d6c"
  ],
  "author": {
    "name": "Johannes Schindelin",
    "email": "johannes.schindelin@gmx.de",
    "time": "Tue Jul 28 11:46:35 2026 +0000"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Jul 28 15:39:59 2026 -0700"
  },
  "message": "mingw: skip symlink type auto-detection for network share targets\n\nOn Windows, symbolic links come in two flavors: file symlinks and\ndirectory symlinks.  Since Git was born on Linux where this distinction\ndoes not exist, Git for Windows has to auto-detect the type by looking\nat the target.  When the target does not yet exist at symlink creation\ntime, Git for Windows creates a \"phantom\" file symlink and later, once\ncheckout is complete, calls `CreateFileW()` on the target to check\nwhether it is actually a directory.\n\nIf the symlink target is a UNC path (e.g. `\\\\attacker\\share`), this\nauto-detection triggers an SMB connection to the remote host.  Windows\nperforms NTLM authentication by default for such connections, which\nmeans a crafted repository can exfiltrate the cloning user\u0027s NTLMv2 hash\nto an attacker-controlled server without any user interaction beyond\n`git clone -c core.symlinks\u003dtrue \u003curl\u003e`.\n\nThere are ways to specify UNC paths that start with only a single\nbackslash (e.g. `\\??\\UNC\\host\\share`); All of them do start like that,\nthough, so let\u0027s use that as a tell-tale that we should skip the\nauto-detection in `process_phantom_symlink()`. The symlink is then left\nas a file symlink (the `mklink` default), and a warning is emitted\nsuggesting the user set the `symlink` gitattribute to `dir` if a\ndirectory symlink is needed.  When the attribute is already set,\nauto-detection is never invoked in the first place, so that code path is\nunaffected.\n\nThis is the same class of vulnerability as CVE-2025-66413\n(https://github.com/git-for-windows/git/security/advisories/GHSA-hv9c-4jm9-jh3x)\nand follows the same general mitigation pattern that MinTTY adopted for\nANSI escape sequences referencing network share paths\n(https://github.com/mintty/mintty/security/advisories/GHSA-jf4m-m6rv-p6c5).\n\nNote that there are legitimate paths starting with a single backslash\nthat are _not_ network paths: drive-less absolute paths are interpreted\nas relative to the current working directory\u0027s drive. In practice, these\nare highly uncommon (and brittle, just one working directory change away\nfrom breaking). In any case, the only consequence is now that the\nsymlink type of those has to be specified via Git attributes, is all.\n\nReported-by: Justin Lee \u003cjessdhoctor@gmail.com\u003e\nAddresses: CVE-2026-32631\nAssisted-by: Claude Opus 4.6\nSigned-off-by: Johannes Schindelin \u003cjohannes.schindelin@gmx.de\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3eca3a7f2e87b2bf6afc796179e36fec18537a3f",
      "old_mode": 33188,
      "old_path": "compat/mingw.c",
      "new_id": "2b0d162d49838193e81b7dca3f8811454eebbb41",
      "new_mode": 33188,
      "new_path": "compat/mingw.c"
    }
  ]
}
