OS Command Injection in ruby-git - CVE-2022-25648
Published: November 18, 2022
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary shell commands on the target system.
The vulnerability exists due to improper input validation when calling the fetch(remote = 'origin', opts = {}) function. A remote unauthenticated attacker can pass specially crafted data to the application and execute arbitrary OS commands via git argument.
Successful exploitation of this vulnerability may result in complete compromise of vulnerable system.
Affected software
Red Hat Satellite
Fedora
Debian Linux
Ubuntu
ruby-git (Debian package)
ruby-git (Ubuntu package)
rubygem-git
How to mitigate CVE-2022-25648
ruby-git (Debian package) - addressed in versions 1.2.8-1+deb10u1, 1.7.0-1+deb11u1
ruby-git (Ubuntu package) - addressed in versions 1.2.8-1ubuntu0.16.04.1~esm1, 1.2.8-1ubuntu0.18.04.1~esm1, 1.6.0+0-1ubuntu0.1~esm1, 1.9.1-1ubuntu0.1~esm1
rubygem-git - addressed in versions 1.3.0-2.el7, 1.11.0-1.el8, 1.11.0-1.fc34, 1.11.0-1.fc35, 1.11.0-1.fc36
External References
- https://snyk.io/vuln/SNYK-RUBY-GIT-2421270
- https://github.com/ruby-git/ruby-git/releases/tag/v1.11.0
- https://github.com/ruby-git/ruby-git/pull/569
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/Q2V3HOFU4ZVTQZHAVAVL3EX2KU53SP7R/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PTJUF6SFPL4ZVSJQHGQ36KFPFO5DQVYZ/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XWNJA7WPE67LJ3DJMWZ2TADHCZKWMY55/
Related Security Bulletins
- OS command injection in ruby-git
- Multiple vulnerabilities in Red Hat Satellite 6.12
- Fedora 35 update for rubygem-git
- Fedora 36 update for rubygem-git
- Fedora 34 update for rubygem-git
- Fedora EPEL 8 update for rubygem-git
- Fedora EPEL 7 update for rubygem-git
- Debian update for ruby-git
- Debian update for ruby-git
- Ubuntu update for ruby-git