CVE catalog

CVE-2022-41903

git: CVE-2022-41903

[CVE catalog]

Severity
Critical · CVSS 9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
Source
[NVD] · [CVE record]
EPSS
44.27% · Oct 25, 2026

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`.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debiangitsid1:2.55.0-1fixed
Debiangitforky1:2.53.0-1fixed
Debiangittrixie1:2.47.3-0+deb13u1fixed
Debiangitbookworm1:2.39.5-0+deb12u3fixed
Debiangitbookworm-security1:2.39.5-0+deb12u2fixed
Ubuntugitpro1:2.5.0-1vulnerable
Ubuntugitpro1:2.6.2-1vulnerable
Ubuntugitpro1:2.6.3-1vulnerable
Ubuntugitpro1:2.6.4-1vulnerable
Ubuntugitpro1:2.7.0~rc3-1vulnerable
Ubuntugitpro1:2.7.0-1vulnerable
Ubuntugitpro1:2.7.3-0ubuntu1vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.1vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.2vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.3vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.4vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.5vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.6vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.7vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.8vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.9vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.10vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.10+esm1vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.10+esm3vulnerable
Ubuntugitpro1:2.7.4-0ubuntu1.10+esm4fixed
Ubuntugit18.041:2.14.1-1ubuntu4vulnerable
Ubuntugit18.041:2.15.1-1ubuntu2vulnerable
Ubuntugit18.041:2.17.0-1ubuntu1vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.1vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.3vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.4vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.5vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.6vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.7vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.8vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.9vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.10vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.11vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.12vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.13vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.14vulnerable
Ubuntugit18.041:2.17.1-1ubuntu0.15fixed
Ubuntugit20.041:2.20.1-2ubuntu1vulnerable
Ubuntugit20.041:2.24.0-1ubuntu1vulnerable
Ubuntugit20.041:2.24.0-1ubuntu2vulnerable
Ubuntugit20.041:2.25.0-1ubuntu1vulnerable
Ubuntugit20.041:2.25.1-1ubuntu1vulnerable
Ubuntugit20.041:2.25.1-1ubuntu2vulnerable
Ubuntugit20.041:2.25.1-1ubuntu3vulnerable
Ubuntugit20.041:2.25.1-1ubuntu3.1vulnerable
Ubuntugit20.041:2.25.1-1ubuntu3.2vulnerable
Ubuntugit20.041:2.25.1-1ubuntu3.3vulnerable
Ubuntugit20.041:2.25.1-1ubuntu3.4vulnerable
Ubuntugit20.041:2.25.1-1ubuntu3.5vulnerable
Ubuntugit20.041:2.25.1-1ubuntu3.6vulnerable
Ubuntugit20.041:2.25.1-1ubuntu3.7vulnerable
Ubuntugit20.041:2.25.1-1ubuntu3.8fixed
Ubuntugit22.041:2.32.0-1ubuntu1vulnerable
Ubuntugit22.041:2.33.1-1ubuntu1vulnerable
Ubuntugit22.041:2.34.1-1ubuntu1vulnerable
Ubuntugit22.041:2.34.1-1ubuntu1.1vulnerable
Ubuntugit22.041:2.34.1-1ubuntu1.2vulnerable
Ubuntugit22.041:2.34.1-1ubuntu1.4vulnerable
Ubuntugit22.041:2.34.1-1ubuntu1.5vulnerable
Ubuntugit22.041:2.34.1-1ubuntu1.6fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiangitsourcesid1:2.39.1-0.1not yet assignedNot reported[1029114]
Debiangitsourceforky1:2.39.1-0.1not yet assignedNot reported[1029114]
Debiangitsourcetrixie1:2.39.1-0.1not yet assignedNot reported[1029114]
Debiangitsourcebookworm1:2.39.1-0.1not yet assignedNot reported[1029114]
Ubuntugitdebpro1:2.7.4-0ubuntu1.10+esm4Not reportedUBUNTU-CVE-2022-41903Not reported
Ubuntugitdeb18.041:2.17.1-1ubuntu0.15Not reportedUBUNTU-CVE-2022-41903Not reported
Ubuntugitdeb20.041:2.25.1-1ubuntu3.8Not reportedUBUNTU-CVE-2022-41903Not reported
Ubuntugitdeb22.041:2.34.1-1ubuntu1.6Not reportedUBUNTU-CVE-2022-41903Not reported

[Debian bug #1029114]

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [git]Fixed
    Details (4)
    • 1:2.39.5-0+deb12u3 · amd64 · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · arm64 · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · amd64 · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · arm64 · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

  • [git-all]Fixed

    Source package: [git]

    Details (4)
    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

  • [git-cvs]Fixed

    Source package: [git]

    Details (4)
    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

  • Source package: [git]

    Details (4)
    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

  • Source package: [git]

    Details (4)
    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

  • [git-doc]Fixed

    Source package: [git]

    Details (4)
    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

  • [git-email]Fixed

    Source package: [git]

    Details (4)
    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

  • [git-gui]Fixed

    Source package: [git]

    Details (4)
    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

  • [gitk]Fixed

    Source package: [git]

    Details (4)
    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

  • [git-man]Fixed

    Source package: [git]

    Details (4)
    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

  • Source package: [git]

    Details (4)
    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

  • [git-svn]Fixed

    Source package: [git]

    Details (4)
    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

  • [gitweb]Fixed

    Source package: [git]

    Details (4)
    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u3 · all · bookworm

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

    • 1:2.39.5-0+deb12u2 · all · bookworm-security

      Fixed · Fixed: 1:2.39.1-0.1

      dsa · git · debian · bookworm

Observed:

References