9.8
CRITICAL
CVE-2022-41903
Git Integer Overflow in Commit Formatting Can Lead to Arbitrary Code Execution
Description

Git is distributed revision control system. `git log` can display commits in an arbitrary format using its `--format` specifiers. This functionality is also exposed to `git archive` via the `export-subst` gitattribute. When processing the padding operators, there is a integer overflow in `pretty.c::format_and_pad_commit()` where a `size_t` is stored improperly as an `int`, and then added as an offset to a `memcpy()`. This overflow can be triggered directly by a user running a command which invokes the commit formatting machinery (e.g., `git log --format=...`). It may also be triggered indirectly through git archive via the export-subst mechanism, which expands format specifiers inside of files within the repository during a git archive. This integer overflow can result in arbitrary heap writes, which may result in arbitrary 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. Users who are unable to upgrade should disable `git archive` in untrusted repositories. If you expose git archive via `git daemon`, disable it by running `git config --global daemon.uploadArch false`.

INFO

Published Date :

Jan. 17, 2023, 11:15 p.m.

Last Modified :

Dec. 27, 2023, 10:15 a.m.

Remotely Exploitable :

Yes !

Impact Score :

5.9

Exploitability Score :

3.9
Public PoC/Exploit Available at Github

CVE-2022-41903 has a 5 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

Affected Products

The following products are affected by CVE-2022-41903 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Git git
1 Git-scm git
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2022-41903.

URL Resource
https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#_export_subst Vendor Advisory
https://git-scm.com/docs/pretty-formats#Documentation/pretty-formats.txt-emltltNgttruncltruncmtruncem Vendor Advisory
https://github.com/git/git/commit/508386c6c5857b4faa2c3e491f422c98cc69ae76 Patch Release Notes Third Party Advisory
https://github.com/git/git/security/advisories/GHSA-475x-2q3q-hvwq Third Party Advisory
https://security.gentoo.org/glsa/202312-15

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

zomotoa food app

Updated: 1 year, 5 months ago
0 stars 0 fork 0 watcher
Born at : June 9, 2023, 7:24 a.m. This repo has been linked 39 different CVEs too.

None

Updated: 1 year, 7 months ago
0 stars 2 fork 2 watcher
Born at : April 8, 2023, 6:19 a.m. This repo has been linked 923 different CVEs too.

demo

Updated: 1 year, 9 months ago
0 stars 0 fork 0 watcher
Born at : Feb. 15, 2023, 7:10 p.m. This repo has been linked 1 different CVEs too.

None

Updated: 9 months, 1 week ago
20 stars 3 fork 3 watcher
Born at : Feb. 14, 2023, 6:10 p.m. This repo has been linked 921 different CVEs too.

vulnerabilities, CVE-2022-41903, and CVE-2022-23521, that affect versions 2.39 and older. Git for Windows was also patched to address an additional, Windows-specific issue known as CVE-2022-41953.

Shell

Updated: 1 year, 9 months ago
0 stars 0 fork 0 watcher
Born at : Jan. 26, 2023, 8:34 a.m. This repo has been linked 3 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2022-41903 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2022-41903 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Dec. 27, 2023

    Action Type Old Value New Value
    Added Reference GitHub, Inc. https://security.gentoo.org/glsa/202312-15 [No types assigned]
  • Initial Analysis by [email protected]

    Jan. 25, 2023

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://github.com/git/git/commit/508386c6c5857b4faa2c3e491f422c98cc69ae76 No Types Assigned https://github.com/git/git/commit/508386c6c5857b4faa2c3e491f422c98cc69ae76 Patch, Release Notes, Third Party Advisory
    Changed Reference Type https://github.com/git/git/security/advisories/GHSA-475x-2q3q-hvwq No Types Assigned https://github.com/git/git/security/advisories/GHSA-475x-2q3q-hvwq Third Party Advisory
    Changed Reference Type https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#_export_subst No Types Assigned https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#_export_subst Vendor Advisory
    Changed Reference Type https://git-scm.com/docs/pretty-formats#Documentation/pretty-formats.txt-emltltNgttruncltruncmtruncem No Types Assigned https://git-scm.com/docs/pretty-formats#Documentation/pretty-formats.txt-emltltNgttruncltruncmtruncem Vendor Advisory
    Added CPE Configuration OR *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions up to (including) 2.30.6 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.31.0 up to (including) 2.31.5 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.32.0 up to (including) 2.32.4 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.33.0 up to (including) 2.33.5 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.34.0 up to (including) 2.34.5 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.35.0 up to (including) 2.35.5 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.36.0 up to (including) 2.36.3 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.37.0 up to (including) 2.37.4 *cpe:2.3:a:git-scm:git:*:*:*:*:*:*:*:* versions from (including) 2.38.0 up to (including) 2.38.2 *cpe:2.3:a:git-scm:git:2.39.0:*:*:*:*:*:*:*
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2022-41903 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2022-41903 weaknesses.

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.52 }} 0.01%

score

0.77191

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability