CVE catalog

CVE-2026-5917

libgit2 versions before 1.8.7 and 1.9.0 before 1.9.7 built with the libssh2 SSH backend (USE_SSH=libssh2) contain a shell command injection vulnerability that allows remote attackers to execute arbitr

[CVE catalog]

Severity
Critical · CVSS 9.4
Published
Source
[NVD] · [CVE record]
EPSS
1.43% · Oct 25, 2026

libgit2 versions before 1.8.7 and 1.9.0 before 1.9.7 built with the libssh2 SSH backend (USE_SSH=libssh2) contain a shell command injection vulnerability that allows remote attackers to execute arbitrary commands on an SSH server by supplying a repository path containing unescaped shell metacharacters such as single quotes, semicolons, or pipes. The gen_proto() function in ssh_libssh2.c inserts the repository path directly into a shell command string without escaping special characters before passing it to libssh2_channel_exec(), enabling an attacker to craft a malicious submodule URL in a .gitmodules file that, when processed during a recursive clone, causes the remote server's shell to interpret injected commands under the victim's SSH user account.

Vulnerable and fixed packages

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

DistributionPackageReleaseVersionStatus
Debianlibgit2sid1.9.7+ds-1fixed
Debianlibgit2forky1.9.7+ds-1fixed
Debianlibgit2trixie1.9.0+ds-2+deb13u1fixed
Debianlibgit2trixie-security1.9.0+ds-2+deb13u1fixed
Debianlibgit2bookworm1.5.1+ds-1+deb12u1vulnerable
Debianlibgit2bookworm-security1.5.1+ds-1+deb12u2fixed
Ubuntulibgit2noble1.7.2+ds-1ubuntu3.2fixed
Ubuntulibgit2-1.7noble1.7.2+ds-1ubuntu3.2fixed
Ubuntulibgit2-devnoble1.7.2+ds-1ubuntu3.2fixed
Ubuntulibgit2-fixturesnoble1.7.2+ds-1ubuntu3.2fixed
Ubuntulibgit2pro1.1.0+dfsg.1-4vulnerable
Ubuntulibgit2pro1.1.0+dfsg.1-4.1vulnerable
Ubuntulibgit2pro1.1.0+dfsg.1-4.1build1vulnerable
Ubuntulibgit2pro1.1.0+dfsg.1-4.1ubuntu0.1vulnerable
Ubuntulibgit2pro1.1.0+dfsg.1-4.1ubuntu0.1+esm1vulnerable
Ubuntulibgit2pro1.1.0+dfsg.1-4.1ubuntu0.1+esm2fixed
Ubuntulibgit224.041.5.1+ds-1ubuntu1vulnerable
Ubuntulibgit224.041.7.1+ds-2ubuntu1vulnerable
Ubuntulibgit224.041.7.2+ds-1ubuntu1vulnerable
Ubuntulibgit224.041.7.2+ds-1ubuntu2vulnerable
Ubuntulibgit224.041.7.2+ds-1ubuntu3vulnerable
Ubuntulibgit224.041.7.2+ds-1ubuntu3.1vulnerable
Ubuntulibgit224.041.7.2+ds-1ubuntu3.2fixed
Ubuntulibgit226.041.9.0+ds-2ubuntu2vulnerable
Ubuntulibgit226.041.9.1+ds-1ubuntu1vulnerable
Ubuntulibgit226.041.9.1+ds-1ubuntu1.1vulnerable
Ubuntulibgit226.041.9.1+ds-1ubuntu1.2fixed
Ubuntulibgit2pro1.1.0+dfsg.1-4vulnerable
Ubuntulibgit2pro1.1.0+dfsg.1-4.1vulnerable
Ubuntulibgit2pro1.1.0+dfsg.1-4.1build1vulnerable
Ubuntulibgit2pro1.1.0+dfsg.1-4.1ubuntu0.1vulnerable
Ubuntulibgit2pro1.1.0+dfsg.1-4.1ubuntu0.1+esm1vulnerable
Ubuntulibgit2pro1.1.0+dfsg.1-4.1ubuntu0.1+esm2fixed
Ubuntulibgit224.041.5.1+ds-1ubuntu1vulnerable
Ubuntulibgit224.041.7.1+ds-2ubuntu1vulnerable
Ubuntulibgit224.041.7.2+ds-1ubuntu1vulnerable
Ubuntulibgit224.041.7.2+ds-1ubuntu2vulnerable
Ubuntulibgit224.041.7.2+ds-1ubuntu3vulnerable
Ubuntulibgit224.041.7.2+ds-1ubuntu3.1vulnerable
Ubuntulibgit224.041.7.2+ds-1ubuntu3.2fixed
Ubuntulibgit226.041.9.0+ds-2ubuntu2vulnerable
Ubuntulibgit226.041.9.1+ds-1ubuntu1vulnerable
Ubuntulibgit226.041.9.1+ds-1ubuntu1.1vulnerable
Ubuntulibgit226.041.9.1+ds-1ubuntu1.2fixed
Opensuselibgit2tumbleweed1.9.7-1.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianlibgit2sourcesid1.9.7+ds-1not yet assignedNot reported[1144465]
Debianlibgit2sourceforky1.9.7+ds-1not yet assignedNot reported[1144465]
Debianlibgit2sourcetrixie1.9.0+ds-2+deb13u1not yet assignedNot reported[1144465]
Debianlibgit2sourcebookworm1.5.1+ds-1+deb12u2not yet assignedNot reported[1144465]
Ubuntulibgit2debnoble1.7.2+ds-1ubuntu3.2Not reportedNot reportedNot reported
Ubuntulibgit2-1.7debnoble1.7.2+ds-1ubuntu3.2Not reportedNot reportedNot reported
Ubuntulibgit2-devdebnoble1.7.2+ds-1ubuntu3.2Not reportedNot reportedNot reported
Ubuntulibgit2-fixturesdebnoble1.7.2+ds-1ubuntu3.2Not reportedNot reportedNot reported
Ubuntulibgit2debpro1.1.0+dfsg.1-4.1ubuntu0.1+esm2Not reportedUSN-8809-1Not reported
Ubuntulibgit2deb24.041.7.2+ds-1ubuntu3.2Not reportedUSN-8809-1Not reported
Ubuntulibgit2deb26.041.9.1+ds-1ubuntu1.2Not reportedUSN-8809-1Not reported
Ubuntulibgit2debpro1.1.0+dfsg.1-4.1ubuntu0.1+esm2Not reportedUBUNTU-CVE-2026-5917Not reported
Ubuntulibgit2deb24.041.7.2+ds-1ubuntu3.2Not reportedUBUNTU-CVE-2026-5917Not reported
Ubuntulibgit2deb26.041.9.1+ds-1ubuntu1.2Not reportedUBUNTU-CVE-2026-5917Not reported
Opensuselibgit2rpmtumbleweed1.9.7-1.1Not reportedOPENSUSE-SU-2026:11521-1Not reported

[Debian bug #1144465]

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [libgit2-1.5]Affected

    Source package: [libgit2]

    Details (4)
    • 1.5.1+ds-1+deb12u1 · amd64 · bookworm

      Affected · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.5.1+ds-1+deb12u1 · arm64 · bookworm

      Affected · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.5.1+ds-1+deb12u1 · amd64 · bookworm-security

      Affected · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.5.1+ds-1+deb12u1 · arm64 · bookworm-security

      Affected · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

  • [libgit2-dev]Affected

    Source package: [libgit2]

    Details (6)
    • 1.5.1+ds-1+deb12u1 · amd64 · bookworm

      Affected · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.5.1+ds-1+deb12u1 · arm64 · bookworm

      Affected · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.8.4+ds-3~bpo12+1 · amd64 · bookworm-backports

      Fixed · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.8.4+ds-3~bpo12+1 · arm64 · bookworm-backports

      Fixed · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.5.1+ds-1+deb12u1 · amd64 · bookworm-security

      Affected · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.5.1+ds-1+deb12u1 · arm64 · bookworm-security

      Affected · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

  • Source package: [libgit2]

    Details (6)
    • 1.5.1+ds-1+deb12u1 · all · bookworm

      Affected · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.5.1+ds-1+deb12u1 · all · bookworm

      Affected · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.8.4+ds-3~bpo12+1 · all · bookworm-backports

      Fixed · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.8.4+ds-3~bpo12+1 · all · bookworm-backports

      Fixed · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.5.1+ds-1+deb12u1 · all · bookworm-security

      Affected · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.5.1+ds-1+deb12u1 · all · bookworm-security

      Affected · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

  • Source package: [libgit2]

    Details (2)
    • 1.8.4+ds-3~bpo12+1 · amd64 · bookworm-backports

      Fixed · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

    • 1.8.4+ds-3~bpo12+1 · arm64 · bookworm-backports

      Fixed · Fixed: 1.5.1+ds-1+deb12u2

      nvd · libgit2 · debian · bookworm; nvd · libgit2 · debian · 12

[Debian 13 (Trixie)]

  • [libgit2-1.9]Affected

    Source package: [libgit2]

    Details (4)
    • 1.9.0+ds-2 · amd64 · trixie

      Affected · Fixed: 1.9.0+ds-2+deb13u1

      nvd · libgit2 · debian · 13

    • 1.9.0+ds-2 · arm64 · trixie

      Affected · Fixed: 1.9.0+ds-2+deb13u1

      nvd · libgit2 · debian · 13

    • 1.9.0+ds-2+deb13u1 · amd64 · trixie-security

      Fixed · Fixed: 1.9.0+ds-2+deb13u1

      nvd · libgit2 · debian · 13

    • 1.9.0+ds-2+deb13u1 · arm64 · trixie-security

      Fixed · Fixed: 1.9.0+ds-2+deb13u1

      nvd · libgit2 · debian · 13

  • [libgit2-dev]Affected

    Source package: [libgit2]

    Details (4)
    • 1.9.0+ds-2 · amd64 · trixie

      Affected · Fixed: 1.9.0+ds-2+deb13u1

      nvd · libgit2 · debian · 13

    • 1.9.0+ds-2 · arm64 · trixie

      Affected · Fixed: 1.9.0+ds-2+deb13u1

      nvd · libgit2 · debian · 13

    • 1.9.0+ds-2+deb13u1 · amd64 · trixie-security

      Fixed · Fixed: 1.9.0+ds-2+deb13u1

      nvd · libgit2 · debian · 13

    • 1.9.0+ds-2+deb13u1 · arm64 · trixie-security

      Fixed · Fixed: 1.9.0+ds-2+deb13u1

      nvd · libgit2 · debian · 13

  • Source package: [libgit2]

    Details (4)
    • 1.9.0+ds-2 · all · trixie

      Affected · Fixed: 1.9.0+ds-2+deb13u1

      nvd · libgit2 · debian · 13

    • 1.9.0+ds-2 · all · trixie

      Affected · Fixed: 1.9.0+ds-2+deb13u1

      nvd · libgit2 · debian · 13

    • 1.9.0+ds-2+deb13u1 · all · trixie-security

      Fixed · Fixed: 1.9.0+ds-2+deb13u1

      nvd · libgit2 · debian · 13

    • 1.9.0+ds-2+deb13u1 · all · trixie-security

      Fixed · Fixed: 1.9.0+ds-2+deb13u1

      nvd · libgit2 · debian · 13

[openSUSE Tumbleweed]

  • [libgit2-1_9]Unknown

    Source package: [libgit2]

    Details (1)
    • 1.9.7-1.1 · x86_64 · tumbleweed

      Unknown · Fixed: 1.9.7-1.1

      Version impact unknown

      nvd · libgit2 · opensuse · tumbleweed

  • [libgit2-devel]Unknown

    Source package: [libgit2]

    Details (1)
    • 1.9.7-1.1 · x86_64 · tumbleweed

      Unknown · Fixed: 1.9.7-1.1

      Version impact unknown

      nvd · libgit2 · opensuse · tumbleweed

  • [libgit2-tools]Unknown

    Source package: [libgit2]

    Details (1)
    • 1.9.7-1.1 · x86_64 · tumbleweed

      Unknown · Fixed: 1.9.7-1.1

      Version impact unknown

      nvd · libgit2 · opensuse · tumbleweed

Observed:

References