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`.
CVSS Details
- CVSS 3.1 Base Score: 9.8
- CVSS 3.1 Vector: (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Alma_linux | — | Upgrade gitUpgrade perl-Git-SVNUpgrade gitkUpgrade git-subtreeUpgrade gitwebUpgrade git-coreUpgrade perl-GitUpgrade git-emailUpgrade git-credential-libsecretUpgrade git-core-docUpgrade git-daemonUpgrade git-allUpgrade git-guiUpgrade git-svnUpgrade git-instaweb | Feb 9, 2023 | Jan 17, 2023 |
| Alpine Linux | — | Upgrade git | Aug 22, 2024 | Jan 17, 2023 |
| Amazon Linux Ami 2 | — | Upgrade git-svnUpgrade git-allUpgrade git-core-docUpgrade git-coreUpgrade gitwebUpgrade gitUpgrade git-credential-libsecretUpgrade gitkUpgrade git-subtreeUpgrade git-guiUpgrade git-cvsUpgrade perl-Git-SVNUpgrade perl-GitUpgrade git-emailUpgrade git-daemonUpgrade git-debuginfoUpgrade git-p4Upgrade git-instaweb | Feb 7, 2023 | Jan 17, 2023 |
| Amazon_linux | — | Upgrade git | Feb 7, 2023 | Jan 17, 2023 |
| Amazon_linux_2023 | — | Upgrade git-coreUpgrade git-daemon-debuginfoUpgrade git-cvsUpgrade git-debugsourceUpgrade git-svnUpgrade gitUpgrade gitkUpgrade perl-Git-SVNUpgrade git-subtreeUpgrade git-core-debuginfoUpgrade git-credential-libsecret-debuginfoUpgrade git-core-docUpgrade git-emailUpgrade perl-GitUpgrade gitwebUpgrade git-p4Upgrade git-credential-libsecretUpgrade git-allUpgrade git-daemonUpgrade git-instawebUpgrade git-guiUpgrade git-debuginfo | Feb 17, 2025 | Jan 17, 2023 |
| Centos_linux | — | Upgrade git-guiUpgrade git-daemonUpgrade gitkUpgrade git-allUpgrade git-instawebUpgrade perl-Git-SVNUpgrade git-emailUpgrade git-p4Upgrade perl-GitUpgrade git-debuginfoUpgrade emacs-gitUpgrade git-hgUpgrade gitwebUpgrade git-svnUpgrade git-cvsUpgrade git-bzrUpgrade emacs-git-elUpgrade gitUpgrade git-gnome-keyring | Feb 8, 2023 | Jan 17, 2023 |
| Debian | — | Upgrade git | Jan 30, 2023 | Jan 17, 2023 |
| Freebsd | — | Upgrade git | Feb 22, 2023 | Feb 21, 2023 |
| Gentoo Linux | — | Upgrade dev-vcs/git. | Dec 28, 2023 | Jan 17, 2023 |
| Huawei Euleros 2_0_sp10 | — | Upgrade gitUpgrade git-help | Mar 20, 2023 | Jan 17, 2023 |
| Huawei Euleros 2_0_sp11 | — | Upgrade gitUpgrade git-help | May 8, 2023 | Jan 17, 2023 |
| Huawei Euleros 2_0_sp5 | — | Upgrade git-coreUpgrade git-core-docUpgrade git | Jun 9, 2023 | Jan 17, 2023 |
| Huawei Euleros 2_0_sp8 | — | Upgrade gitUpgrade git-coreUpgrade git-core-doc | Apr 13, 2023 | Jan 17, 2023 |
| Huawei Euleros 2_0_sp9 | — | Upgrade gitUpgrade git-help | Mar 9, 2023 | Jan 17, 2023 |
| Oracle_linux | — | Upgrade git-hgUpgrade gitkUpgrade git-core-docUpgrade git-allUpgrade emacs-git-elUpgrade emacs-gitUpgrade gitUpgrade gitwebUpgrade git-credential-libsecretUpgrade git-gnome-keyringUpgrade git-subtreeUpgrade git-p4Upgrade git-guiUpgrade git-cvsUpgrade git-bzrUpgrade git-coreUpgrade git-svnUpgrade perl-Git-SVNUpgrade perl-GitUpgrade git-emailUpgrade git-instawebUpgrade git-daemon | Feb 7, 2023 | Jan 17, 2023 |
| Redhat_linux | — | Upgrade git-gnome-keyringUpgrade git-allUpgrade git-svnUpgrade git-daemon-debuginfoUpgrade git-core-docUpgrade perl-Git-SVNUpgrade git-debugsourceUpgrade git-coreUpgrade emacs-git-elUpgrade git-credential-libsecretNo solution existsUpgrade gitwebUpgrade gitUpgrade git-bzrUpgrade gitkUpgrade emacs-gitUpgrade git-daemonUpgrade git-p4Upgrade git-hgUpgrade git-core-debuginfoUpgrade git-debuginfoUpgrade git-subtreeUpgrade git-guiUpgrade perl-GitUpgrade git-credential-libsecret-debuginfoUpgrade git-cvsUpgrade git-emailUpgrade git-instaweb | Feb 8, 2023 | Jan 17, 2023 |
| Rocky_linux | — | Upgrade git-daemonUpgrade git-coreUpgrade git-debuginfoUpgrade git-core-debuginfoUpgrade git-daemon-debuginfoUpgrade git-debugsourceUpgrade git-subtreeUpgrade gitUpgrade git-credential-libsecret-debuginfoUpgrade git-credential-libsecret | Mar 12, 2024 | Jan 17, 2023 |
| Suse | — | Upgrade git-credential-libsecretUpgrade git-archUpgrade git-webUpgrade git-cvsUpgrade gitUpgrade git-credential-gnome-keyringUpgrade git-svnUpgrade gitkUpgrade git-emailUpgrade git-daemonUpgrade perl-GitUpgrade git-guiUpgrade git-coreUpgrade git-docUpgrade git-p4 | Jan 23, 2023 | Jan 17, 2023 |
| Ubuntu | — | Upgrade gitUpgrade git (Ubuntu Pro) | Jan 20, 2023 | Jan 17, 2023 |
| Vmware Photon_os | — | Use 'tdnf update' to upgrade all packages to the latest version. | Jan 20, 2025 | Jan 17, 2023 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub