# What is CVE-2022-23521?

> CVE-2022-23521 is a critical-severity flaw (CVSS 9.8) in Git from Git-Scm, published on 17 January 2023. It is not on the list of flaws known to be exploited today. The latest forecast puts its chance of use in the next 30 days at 56%. If you run an affected version, plan in the vendor’s fix.

Canonical page: https://www.precursorintelligence.com/what-is/cve-2022-23521

## At a glance

- **Verdict:** Fix this soon. Not confirmed as exploited yet, but serious or likely enough that it should not wait for a quiet month.
- **Precursor Intelligence risk score:** 65 out of 100 (Medium); action: Plan remediation. Kept up to date as the evidence changes.
- **Severity:** Critical (CVSS 9.8 out of 10)
- **Known to be exploited:** No, not on the list of flaws known to be exploited today
- **Chance of use in the next 30 days:** 56% (latest exploit-likelihood forecast)
- **Published:** 17 January 2023
- **Record last updated:** 27 December 2023
- **Main product:** Git from Git-Scm
- **Affected products:** 1

## What is CVE-2022-23521? In plain terms

It can be attacked from anywhere on the internet without logging in, and nobody has to click anything. If it works, the attacker can read data, change data and take it offline.

### The official description

Git is distributed revision control system. gitattributes are a mechanism to allow defining attributes for paths. These attributes can be defined by adding a `.gitattributes` file to the repository, which contains a set of file patterns and the attributes that should be set for paths matching this pattern. When parsing gitattributes, multiple integer overflows can occur when there is a huge number of path patterns, a huge number of attributes for a single pattern, or when the declared attribute names are huge. These overflows can be triggered via a crafted `.gitattributes` file that may be part of the commit history. Git silently splits lines longer than 2KB when parsing gitattributes from a file, but not when parsing them from the index. Consequentially, the failure mode depends on whether the file exists in the working tree, the index or both. This integer overflow can result in arbitrary heap reads and writes, which may result in remote code execution. The problem has been patched in the versions published on 2023-01-17, going back to v2.30.7. Users are advised to upgrade. There are no known workarounds for this issue.

### What kind of flaw is it?

- CWE-190: Integer Overflow or Wraparound

### How an attack on it works

- Where an attacker can be: Anywhere on the internet
- How hard it is to pull off: Easy: no special conditions
- Login needed first: No login needed
- Does someone have to click: No, nobody has to do anything
- What an attacker gets: Can read data, change data and take it offline

Severity vector: `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## Is CVE-2022-23521 being exploited? Not that we know of

It is not on the list of flaws known to be exploited today. The latest forecast puts the chance of it being used in the next 30 days at 56%. That can change at any time, which is why we keep watching.

Exploit likelihood over the last 7 days: 56%, 56%, 56%, 56%, 56%, 56%, 56%.

### Timeline

- 17 January 2023: Published
- 27 December 2023: Record last updated
- 16 June 2026: Exploit likelihood jumped

### How Precursor Intelligence ranks it

CVE-2022-23521 scores **65 out of 100 (Medium)**, with the action "Plan remediation".

Every published flaw gets a risk score from 0 to 100, kept up to date as the evidence changes. Four things go into the score, from the one that counts most to the ones that count less:

- Evidence it is being exploited: biggest factor
- How severe it is: strong factor
- How widely exposed it is: smaller factor
- Threat activity around it: smaller factor

85 and above is Critical. Anything confirmed as exploited is always marked for an emergency patch, whatever its score. When this flaw matches software you track, it lands in your list with its score and the reasons behind it.

## Who is affected by CVE-2022-23521?

The published record lists 1 product.

- [Git](https://www.precursorintelligence.com/product/git-scm/git) by [Git-Scm](https://www.precursorintelligence.com/vendors/git-scm) (Application): up to 2.30.6, 2.31.0 to 2.31.5, 2.32.0 to 2.32.4, 2.33.0 to 2.33.5, 2.34.0 to 2.34.5, 2.35.0 to 2.35.5, 2.36.0 to 2.36.3, 2.37.0 to 2.37.4, 2.38.0 to 2.38.2, 2.39.0

## How do I fix CVE-2022-23521?

1. **Check whether you run it.** Compare your versions with the affected products above. Not sure what you run? Precursor Intelligence can work it out from your public website, or you can pick it from a list.
2. **Apply the vendor’s fix.** Install the update named in the vendor’s advisory. We’ve put the advisory first in the list.
3. **If you can’t patch today.** Follow any mitigation the vendor publishes, and limit who can reach the affected system from the internet until the update is in.
4. **Keep an eye on it.** Track the product and we tell you as soon as we spot this flaw on the list of exploited flaws, or a jump in its exploit likelihood.

### References

- [github.com](https://github.com/git/git/commit/508386c6c5857b4faa2c3e491f422c98cc69ae76) (Patch, Third-party advisory)
- [github.com](https://github.com/git/git/security/advisories/GHSA-c738-c5qq-xg89) (Third-party advisory)
- [security.gentoo.org](https://security.gentoo.org/glsa/202312-15)

## Questions

### What is CVE-2022-23521?

CVE-2022-23521 is a critical-severity flaw in Git from Git-Scm, published on 17 January 2023. It can be attacked from anywhere on the internet without logging in, and nobody has to click anything. If it works, the attacker can read data, change data and take it offline.

### How serious is CVE-2022-23521?

It scores 9.8 out of 10 on the CVSS severity scale, which is critical. Our risk score for CVE-2022-23521 is 65 out of 100, which is Medium. Its action is "Plan remediation". Not confirmed as exploited yet, but serious or likely enough that it should not wait for a quiet month.

### Is CVE-2022-23521 being exploited?

It is not on the list of flaws known to be exploited today. The latest forecast puts the chance of it being used in the next 30 days at 56%. That can change at any time, which is why we keep watching.

### Which versions does CVE-2022-23521 affect?

For Git from Git-Scm: up to 2.30.6, 2.31.0 to 2.31.5, 2.32.0 to 2.32.4, 2.33.0 to 2.33.5, 2.34.0 to 2.34.5, 2.35.0 to 2.35.5 and 4 more.

### How do I fix CVE-2022-23521?

Install the update the vendor names in its advisory, linked first under "How do I fix" on this page. If you can't patch today, follow the vendor's mitigation and limit who can reach the affected system from the internet.

## Does CVE-2022-23521 affect you?

Precursor Intelligence keeps checking for you:

- **Tell us what you run.** Pick your software from a list, or let us work it out from your website.
- **We match it to every flaw.** Over 400,000 published flaws, checked against your list.
- **Ranked by real-world risk.** Every flaw gets a 0 to 100 risk score, kept up to date, led by evidence criminals are using it.
- **Told as soon as we know.** An alert by email, in the app or by webhook to your own tools.

Start free (no card, nothing to install): https://www.precursorintelligence.com/register
Book a demo: https://www.precursorintelligence.com/contact

