git: Improper Link Resolution Before File Access
CVE-2024-32002 is a critical-severity improper link resolution before file access vulnerability in git, with a CVSS 3.1 base score of 9.0 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists versions 2.43.4, 2.42.2, 2.40.2 as the first without the flaw, so updating git to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 29.2% chance of exploitation within 30 days, which is in the top 1.8% of all scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Update git to 2.43.4 or 2.42.2 or 2.40.2 or 2.39.4, whichever matches your release line, or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Git | git | = 2.45.0; = 2.44.0; >= 2.43.0, < 2.43.4; >= 2.42.0, < 2.42.2; = 2.41.0; >= 2.40.0, < 2.40.2; < 2.39.4; 2.45.0; and 6 more ranges | 2.43.4, 2.42.2, 2.40.2, 2.39.4 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- HighSuccess depends on conditions outside the attacker's control.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 9.0 | Critical | CNA (github.com) |
| CVSS 3.1 | 9.0 | Critical | NVD |
Official description
Git is a revision control system. Prior to versions 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, and 2.39.4, repositories with submodules can be crafted in a way that exploits a bug in Git whereby it can be fooled into writing files not into the submodule's worktree but into a `.git/` directory. This allows writing a hook that will be executed while the clone operation is still running, giving the user no opportunity to inspect the code that is being executed. The problem has been patched in versions 2.45.1, 2.44.1, 2.43.4, 2.42.2, 2.41.1, 2.40.2, and 2.39.4. If symbolic link support is disabled in Git (e.g. via `git config --global core.symlinks false`), the described attack won't work. As always, it is best to avoid cloning repositories from untrusted sources.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Link Resolution Before File Access
The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
How developers prevent this class of flaw
- Follow the principle of least privilege when assigning access rights to entities in a software system. Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.
More Improper Link Resolution Before File Access vulnerabilities (CWE-59)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/git/git/security/advisories/GHSA-8h77-4q3w-gfgvThird Party Advisory
Patches and release notes
Other references
- openwall.com/lists/oss-security/2024/05/14/2
- git-scm.com/docs/git-clone#Documentation/git-clone.txt---recurse-submodulesltpathspecgtNot Applicable
- git-scm.com/docs/git-config#Documentation/git-config.txt-coresymlinksNot Applicable
- lists.debian.org/debian-lts-announce/2024/06/msg00018.html
- lists.fedoraproject.org/archives/list/[email protected]/message/S4CK4IYTXEOBZTEM5K3T6L…
- lists.debian.org/debian-lts-announce/2024/09/msg00009.html
Other vulnerabilities in git
- 7.5 High severity
- 8.6 High severity
- 8.0 High severity
Git Link Following Exploited
- 8.8 High severity
- 7.5 High severity
- 7.8 High severity
Recent Improper Link Resolution Before File Access vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.