critical9.8
CVE-2022-25648
Command injection in ruby-git
Impact
The package prior to v1.11.0 is vulnerable to Command Injection via git argument injection. When calling the `fetch(remote = 'origin', opts = {})` function, the remote parameter is passed to the `git fetch` subcommand in a way such that additional flags can be set. The additional flags can be used to perform a command injection.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| rubygems | git | < 1.11.0 | 1.11.0 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Git | Git | before 1.11.0 |
| Fedoraproject | Extra Packages For Enterprise Linux | Version 8.0 |
| Fedoraproject | Fedora | Versions 34, 35, 36 |
| Debian | Debian Linux | Version 10.0 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/ruby-git/ruby-git/pull/569
- https://github.com/ruby-git/ruby-git/releases/tag/v1.11.0
- https://lists.debian.org/debian-lts-announce/2023/01/msg00043.html
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PTJUF6SFPL4ZVSJQHGQ36KFPFO5DQVYZ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Q2V3HOFU4ZVTQZHAVAVL3EX2KU53SP7R/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XWNJA7WPE67LJ3DJMWZ2TADHCZKWMY55/
- https://snyk.io/vuln/SNYK-RUBY-GIT-2421270
- https://github.com/advisories/GHSA-69p6-wvmq-27gg
- https://nvd.nist.gov/vuln/detail/CVE-2022-25648
- 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/Q2V3HOFU4ZVTQZHAVAVL3EX2KU53SP7R/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XWNJA7WPE67LJ3DJMWZ2TADHCZKWMY55/
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/git/CVE-2022-25648.yml
- https://github.com/ruby-git/ruby-git/commit/291ca0946bec7164b90ad5c572ac147f512c7159