CVE catalog

CVE-2022-39260

git: CVE-2022-39260

[CVE catalog]

Severity
High · CVSS 8.8CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Published
Source
[NVD] · [CVE record]
EPSS
3.99% · Oct 27, 2026

Git is an open source, scalable, distributed revision control system. `git shell` is a restricted login shell that can be used to implement Git's push/pull functionality via SSH. In versions prior to 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, and 2.37.4, the function that splits the command arguments into an array improperly uses an `int` to represent the number of entries in the array, allowing a malicious actor to intentionally overflow the return value, leading to arbitrary heap writes. Because the resulting array is then passed to `execv()`, it is possible to leverage this attack to gain remote code execution on a victim machine. Note that a victim must first allow access to `git shell` as a login shell in order to be vulnerable to this attack. This problem is patched in versions 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, and 2.37.4 and users are advised to upgrade to the latest version. Disabling `git shell` access via remote logins is a viable short-term workaround.

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+esm3fixed
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+esm3fixed
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.13fixed
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.6fixed
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.5fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debiangitsourcesid1:2.38.1-1not yet assignedNot reported[1022046]
Debiangitsourceforky1:2.38.1-1not yet assignedNot reported[1022046]
Debiangitsourcetrixie1:2.38.1-1not yet assignedNot reported[1022046]
Debiangitsourcebookworm1:2.38.1-1not yet assignedNot reported[1022046]
Ubuntugitdebpro1:2.7.4-0ubuntu1.10+esm3Not reportedUSN-5686-2Not reported
Ubuntugitdebpro1:2.7.4-0ubuntu1.10+esm3Not reportedUBUNTU-CVE-2022-39260Not reported
Ubuntugitdeb18.041:2.17.1-1ubuntu0.13Not reportedUBUNTU-CVE-2022-39260Not reported
Ubuntugitdeb20.041:2.25.1-1ubuntu3.6Not reportedUBUNTU-CVE-2022-39260Not reported
Ubuntugitdeb22.041:2.34.1-1ubuntu1.5Not reportedUBUNTU-CVE-2022-39260Not reported

[Debian bug #1022046]

OpenFactory catalog packages

[Debian 12 (Bookworm)]

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-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.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-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.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

  • Source package: [git]

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

  • Source package: [git]

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-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.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-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.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-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.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

  • [gitk]Fixed

    Source package: [git]

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-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.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

  • Source package: [git]

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-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.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

  • [gitweb]Fixed

    Source package: [git]

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

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

      Fixed · Fixed: 1:2.38.1-1

      dsa · git · debian · bookworm

Observed:

References