Bug 2514519 - CVE-2026-5917 rust-libgit2-sys0.17: libgit2: Arbitrary code execution via shell command injection in SSH backend [fedora-all]
Summary: CVE-2026-5917 rust-libgit2-sys0.17: libgit2: Arbitrary code execution via she...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rust-libgit2-sys0.17
Version: 43
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Rust SIG
QA Contact:
URL:
Whiteboard: {"flaws": ["bf1b81d9-4fec-4354-8234-5...
Depends On:
Blocks: CVE-2026-5917
TreeView+ depends on / blocked
 
Reported: 2026-08-12 08:16 UTC by Ganesh
Modified: 2026-08-14 19:50 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-08-14 19:50:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ganesh 2026-08-12 08:16:53 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

libgit2 versions v0.27.0 through v1.9.0 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.

Comment 1 Fabio Valentini 2026-08-14 19:30:16 UTC
This package is retired in Fedora 44+ and is only present on Fedora 43.

On Fedora 43, some applications still need to be rebuilt with a version of the libgit2 crate that has unbundled libgit2.

Comment 2 Fabio Valentini 2026-08-14 19:50:14 UTC
All applications that use libgit2 via the Rust bindings (any version) on Fedora should be getting rebuilt right now.


Note You need to log in before you can comment on or make changes to this bug.