CVE-2022-23521CWE-190

gitattributes parsing integer overflow in git

Critical · published January 17, 2023

Patch now

High probability of exploitation

CVSS calls it critical at 9.8. It sits in the 99.1th percentile for exploit probability.

CVSS v3.1
9.8
EPSS
56%
Percentile
99.1
In the wild
Unconfirmed
What it is

🔥 An integer overflow in Git’s gitattributes parsing can lead to arbitrary code execution! 🎉 Just one crafty `.gitattributes` file can turn this version control hero into a villain! Think of it like a restaurant with a menu that doesn't limit the number of items you can order. If someone submits an order with a zillion choices, the kitchen might just throw a tantrum, trying to prepare everything and end up burning the place down instead! Similarly, Git struggles when hit with too many path patterns, leading to chaos in coding! An attacker could exploit this vulnerability to run arbitrary code on your machine, which could lead to a full compromise. Imagine a hacker taking over your Git repository, altering files, or introducing malicious code—all while you’re none the wiser! This could be absolutely devastating for anyone relying on Git for their project management.

Put simply

Think of it like a restaurant with a menu that doesn't limit the number of items you can order. If someone submits an order with a zillion choices, the kitchen might just throw a tantrum, trying to prepare everything and end up burning the place down instead! Similarly, Git struggles when hit with too many path patterns, leading to chaos in coding! This vulnerability arises from integer overflows during the parsing of `.gitattributes` files if they contain excessive patterns or attributes. This oversight allows for arbitrary heap reads and writes, potentially leading to remote code execution.

What to do

An attacker could exploit this vulnerability to run arbitrary code on your machine, which could lead to a full compromise. Imagine a hacker taking over your Git repository, altering files, or introducing malicious code—all while you’re none the wiser! This could be absolutely devastating for anyone relying on Git for their project management. To secure your systems, update Git to a version released on or after 2023-01-17, preferably to v2.30.7 or later. There are no workarounds, so patching is the best course of action to keep your environment safe! You've got this! With these updates, you'll keep your coding fortress secure! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.56334 · 99.1th percentile
Weakness
CWE-190 · Integer Overflow or Wraparound
Published
2023-01-17T22:17Z
EPSS history
Timeline
  • 17 JAN 22:17Z
    gitattributes parsing integer overflow in git
    cvelistv5