UBUNTU-CVE-2022-41903 (CVE-2022-41903)
Vulnerability from osv_ubuntu – Published: 2023-01-17 18:00 – Updated: 2026-11-24 09:48 – Source websiteGit 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.
| Ecosystem | Package | Version |
|---|---|---|
| Ubuntu:Pro:14.04:LTS |
git
pkg:deb/ubuntu/git@1:1.9.1-1ubuntu0.10+esm1?arch=source&distro=trusty/esm
|
Affected: < 1:1.9.1-1ubuntu0.10+esm1 (ecosystem)
1:1.8.3.2-11:1.8.4.2-11:1.8.4.3-11:1.8.4.4-11:1.8.5-11:1.8.5.1-11:1.8.5.2-11:1.8.5.2-21:1.8.5.3-11:1.9~rc1-1
and 12 more (see JSON)
|
| Ubuntu:Pro:16.04:LTS |
git
pkg:deb/ubuntu/git@1:2.7.4-0ubuntu1.10+esm4?arch=source&distro=esm-infra/xenial
|
Affected: < 1:2.7.4-0ubuntu1.10+esm4 (ecosystem)
1:2.5.0-11:2.6.2-11:2.6.3-11:2.6.4-11:2.7.0~rc3-11:2.7.0-11:2.7.3-0ubuntu11:2.7.4-0ubuntu11:2.7.4-0ubuntu1.11:2.7.4-0ubuntu1.2
and 10 more (see JSON)
|
| Ubuntu:18.04:LTS |
git
pkg:deb/ubuntu/git@1:2.17.1-1ubuntu0.15?arch=source&distro=bionic
|
Affected: < 1:2.17.1-1ubuntu0.15 (ecosystem)
1:2.14.1-1ubuntu41:2.15.1-1ubuntu21:2.17.0-1ubuntu11:2.17.1-1ubuntu0.11:2.17.1-1ubuntu0.31:2.17.1-1ubuntu0.41:2.17.1-1ubuntu0.51:2.17.1-1ubuntu0.61:2.17.1-1ubuntu0.71:2.17.1-1ubuntu0.8
and 6 more (see JSON)
|
| Ubuntu:20.04:LTS |
git
pkg:deb/ubuntu/git@1:2.25.1-1ubuntu3.8?arch=source&distro=focal
|
Affected: < 1:2.25.1-1ubuntu3.8 (ecosystem)
1:2.20.1-2ubuntu11:2.24.0-1ubuntu11:2.24.0-1ubuntu21:2.25.0-1ubuntu11:2.25.1-1ubuntu11:2.25.1-1ubuntu21:2.25.1-1ubuntu31:2.25.1-1ubuntu3.11:2.25.1-1ubuntu3.21:2.25.1-1ubuntu3.3
and 4 more (see JSON)
|
| Ubuntu:22.04:LTS |
git
pkg:deb/ubuntu/git@1:2.34.1-1ubuntu1.6?arch=source&distro=jammy
|
Affected: < 1:2.34.1-1ubuntu1.6 (ecosystem)
1:2.32.0-1ubuntu11:2.33.1-1ubuntu11:2.34.1-1ubuntu11:2.34.1-1ubuntu1.11:2.34.1-1ubuntu1.21:2.34.1-1ubuntu1.41:2.34.1-1ubuntu1.5
|
{
"affected": [
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "git",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-all",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-arch",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-bzr",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-core",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-cvs",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-daemon-run",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-daemon-sysvinit",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-el",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-email",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-gui",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-man",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-mediawiki",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "git-svn",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "gitk",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
},
{
"binary_name": "gitweb",
"binary_version": "1:1.9.1-1ubuntu0.10+esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:14.04:LTS",
"name": "git",
"purl": "pkg:deb/ubuntu/git@1:1.9.1-1ubuntu0.10+esm1?arch=source\u0026distro=trusty/esm"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1:1.9.1-1ubuntu0.10+esm1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1:1.8.3.2-1",
"1:1.8.4.2-1",
"1:1.8.4.3-1",
"1:1.8.4.4-1",
"1:1.8.5-1",
"1:1.8.5.1-1",
"1:1.8.5.2-1",
"1:1.8.5.2-2",
"1:1.8.5.3-1",
"1:1.9~rc1-1",
"1:1.9.0-1",
"1:1.9.1-1",
"1:1.9.1-1ubuntu0.1",
"1:1.9.1-1ubuntu0.2",
"1:1.9.1-1ubuntu0.3",
"1:1.9.1-1ubuntu0.4",
"1:1.9.1-1ubuntu0.5",
"1:1.9.1-1ubuntu0.6",
"1:1.9.1-1ubuntu0.7",
"1:1.9.1-1ubuntu0.8",
"1:1.9.1-1ubuntu0.9",
"1:1.9.1-1ubuntu0.10"
]
},
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "git",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "git-all",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "git-arch",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "git-core",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "git-cvs",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "git-daemon-run",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "git-daemon-sysvinit",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "git-el",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "git-email",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "git-gui",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "git-man",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "git-mediawiki",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "git-svn",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "gitk",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
},
{
"binary_name": "gitweb",
"binary_version": "1:2.7.4-0ubuntu1.10+esm4"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:16.04:LTS",
"name": "git",
"purl": "pkg:deb/ubuntu/git@1:2.7.4-0ubuntu1.10+esm4?arch=source\u0026distro=esm-infra/xenial"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1:2.7.4-0ubuntu1.10+esm4"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1:2.5.0-1",
"1:2.6.2-1",
"1:2.6.3-1",
"1:2.6.4-1",
"1:2.7.0~rc3-1",
"1:2.7.0-1",
"1:2.7.3-0ubuntu1",
"1:2.7.4-0ubuntu1",
"1:2.7.4-0ubuntu1.1",
"1:2.7.4-0ubuntu1.2",
"1:2.7.4-0ubuntu1.3",
"1:2.7.4-0ubuntu1.4",
"1:2.7.4-0ubuntu1.5",
"1:2.7.4-0ubuntu1.6",
"1:2.7.4-0ubuntu1.7",
"1:2.7.4-0ubuntu1.8",
"1:2.7.4-0ubuntu1.9",
"1:2.7.4-0ubuntu1.10",
"1:2.7.4-0ubuntu1.10+esm1",
"1:2.7.4-0ubuntu1.10+esm3"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "git",
"binary_version": "1:2.17.1-1ubuntu0.15"
},
{
"binary_name": "git-all",
"binary_version": "1:2.17.1-1ubuntu0.15"
},
{
"binary_name": "git-cvs",
"binary_version": "1:2.17.1-1ubuntu0.15"
},
{
"binary_name": "git-daemon-run",
"binary_version": "1:2.17.1-1ubuntu0.15"
},
{
"binary_name": "git-daemon-sysvinit",
"binary_version": "1:2.17.1-1ubuntu0.15"
},
{
"binary_name": "git-el",
"binary_version": "1:2.17.1-1ubuntu0.15"
},
{
"binary_name": "git-email",
"binary_version": "1:2.17.1-1ubuntu0.15"
},
{
"binary_name": "git-gui",
"binary_version": "1:2.17.1-1ubuntu0.15"
},
{
"binary_name": "git-man",
"binary_version": "1:2.17.1-1ubuntu0.15"
},
{
"binary_name": "git-mediawiki",
"binary_version": "1:2.17.1-1ubuntu0.15"
},
{
"binary_name": "git-svn",
"binary_version": "1:2.17.1-1ubuntu0.15"
},
{
"binary_name": "gitk",
"binary_version": "1:2.17.1-1ubuntu0.15"
},
{
"binary_name": "gitweb",
"binary_version": "1:2.17.1-1ubuntu0.15"
}
]
},
"package": {
"ecosystem": "Ubuntu:18.04:LTS",
"name": "git",
"purl": "pkg:deb/ubuntu/git@1:2.17.1-1ubuntu0.15?arch=source\u0026distro=bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1:2.17.1-1ubuntu0.15"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1:2.14.1-1ubuntu4",
"1:2.15.1-1ubuntu2",
"1:2.17.0-1ubuntu1",
"1:2.17.1-1ubuntu0.1",
"1:2.17.1-1ubuntu0.3",
"1:2.17.1-1ubuntu0.4",
"1:2.17.1-1ubuntu0.5",
"1:2.17.1-1ubuntu0.6",
"1:2.17.1-1ubuntu0.7",
"1:2.17.1-1ubuntu0.8",
"1:2.17.1-1ubuntu0.9",
"1:2.17.1-1ubuntu0.10",
"1:2.17.1-1ubuntu0.11",
"1:2.17.1-1ubuntu0.12",
"1:2.17.1-1ubuntu0.13",
"1:2.17.1-1ubuntu0.14"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "git",
"binary_version": "1:2.25.1-1ubuntu3.8"
},
{
"binary_name": "git-all",
"binary_version": "1:2.25.1-1ubuntu3.8"
},
{
"binary_name": "git-cvs",
"binary_version": "1:2.25.1-1ubuntu3.8"
},
{
"binary_name": "git-daemon-run",
"binary_version": "1:2.25.1-1ubuntu3.8"
},
{
"binary_name": "git-daemon-sysvinit",
"binary_version": "1:2.25.1-1ubuntu3.8"
},
{
"binary_name": "git-el",
"binary_version": "1:2.25.1-1ubuntu3.8"
},
{
"binary_name": "git-email",
"binary_version": "1:2.25.1-1ubuntu3.8"
},
{
"binary_name": "git-gui",
"binary_version": "1:2.25.1-1ubuntu3.8"
},
{
"binary_name": "git-man",
"binary_version": "1:2.25.1-1ubuntu3.8"
},
{
"binary_name": "git-mediawiki",
"binary_version": "1:2.25.1-1ubuntu3.8"
},
{
"binary_name": "git-svn",
"binary_version": "1:2.25.1-1ubuntu3.8"
},
{
"binary_name": "gitk",
"binary_version": "1:2.25.1-1ubuntu3.8"
},
{
"binary_name": "gitweb",
"binary_version": "1:2.25.1-1ubuntu3.8"
}
]
},
"package": {
"ecosystem": "Ubuntu:20.04:LTS",
"name": "git",
"purl": "pkg:deb/ubuntu/git@1:2.25.1-1ubuntu3.8?arch=source\u0026distro=focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1:2.25.1-1ubuntu3.8"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1:2.20.1-2ubuntu1",
"1:2.24.0-1ubuntu1",
"1:2.24.0-1ubuntu2",
"1:2.25.0-1ubuntu1",
"1:2.25.1-1ubuntu1",
"1:2.25.1-1ubuntu2",
"1:2.25.1-1ubuntu3",
"1:2.25.1-1ubuntu3.1",
"1:2.25.1-1ubuntu3.2",
"1:2.25.1-1ubuntu3.3",
"1:2.25.1-1ubuntu3.4",
"1:2.25.1-1ubuntu3.5",
"1:2.25.1-1ubuntu3.6",
"1:2.25.1-1ubuntu3.7"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "git",
"binary_version": "1:2.34.1-1ubuntu1.6"
},
{
"binary_name": "git-all",
"binary_version": "1:2.34.1-1ubuntu1.6"
},
{
"binary_name": "git-cvs",
"binary_version": "1:2.34.1-1ubuntu1.6"
},
{
"binary_name": "git-daemon-run",
"binary_version": "1:2.34.1-1ubuntu1.6"
},
{
"binary_name": "git-daemon-sysvinit",
"binary_version": "1:2.34.1-1ubuntu1.6"
},
{
"binary_name": "git-email",
"binary_version": "1:2.34.1-1ubuntu1.6"
},
{
"binary_name": "git-gui",
"binary_version": "1:2.34.1-1ubuntu1.6"
},
{
"binary_name": "git-man",
"binary_version": "1:2.34.1-1ubuntu1.6"
},
{
"binary_name": "git-mediawiki",
"binary_version": "1:2.34.1-1ubuntu1.6"
},
{
"binary_name": "git-svn",
"binary_version": "1:2.34.1-1ubuntu1.6"
},
{
"binary_name": "gitk",
"binary_version": "1:2.34.1-1ubuntu1.6"
},
{
"binary_name": "gitweb",
"binary_version": "1:2.34.1-1ubuntu1.6"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "git",
"purl": "pkg:deb/ubuntu/git@1:2.34.1-1ubuntu1.6?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1:2.34.1-1ubuntu1.6"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1:2.32.0-1ubuntu1",
"1:2.33.1-1ubuntu1",
"1:2.34.1-1ubuntu1",
"1:2.34.1-1ubuntu1.1",
"1:2.34.1-1ubuntu1.2",
"1:2.34.1-1ubuntu1.4",
"1:2.34.1-1ubuntu1.5"
]
}
],
"aliases": [],
"details": "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`.",
"id": "UBUNTU-CVE-2022-41903",
"modified": "2026-11-24T09:48:21Z",
"published": "2023-01-17T18:00:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2022-41903"
},
{
"type": "ADVISORY",
"url": "https://ubuntu.com/security/notices/USN-5810-1"
},
{
"type": "ADVISORY",
"url": "https://ubuntu.com/security/notices/USN-5810-2"
},
{
"type": "REPORT",
"url": "https://github.com/git/git/security/advisories/GHSA-475x-2q3q-hvwq"
},
{
"type": "ADVISORY",
"url": "https://ubuntu.com/security/notices/USN-5810-3"
},
{
"type": "ADVISORY",
"url": "https://ubuntu.com/security/notices/USN-5810-4"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2022-41903"
}
],
"related": [
"USN-5810-1",
"USN-5810-2",
"USN-5810-3",
"USN-5810-4"
],
"schema_version": "1.9.2",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"source": "NVD",
"type": "CVSS_V3"
},
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"source": "CNA",
"type": "CVSS_V3"
},
{
"score": "medium",
"source": "SELF",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2022-41903"
]
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.