CVE-2022-46648
Description
ruby-git versions prior to v1.13.0 allows a remote authenticated attacker to execute an arbitrary ruby code by having a user to load a repository containing a specially crafted filename to the product. This vulnerability is different from CVE-2022-47318.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A code injection vulnerability in ruby-git prior to v1.13.0 allows remote authenticated attackers to execute arbitrary Ruby code via a crafted repository filename.
Vulnerability
Analysis
CVE-2022-46648 is a code injection vulnerability (CWE-94) in the ruby-git library, a Ruby interface for Git repositories [1][3]. The flaw exists in versions prior to v1.13.0, where the library fails to properly sanitize file names when loading a repository. An attacker who can convince a user to load a repository containing a specially crafted filename can inject and execute arbitrary Ruby code in the context of the user's application [2][3]. This vulnerability is distinct from CVE-2022-47318, another code injection issue in the same library [2].
Attack
Vector
The attack requires that a remote authenticated attacker provides a repository containing a maliciously named file. The victim must then load this repository using the ruby-git library (e.g., via Git.open, Git.clone, or Git.init) [1]. The attack complexity is low, and the attacker needs network access and a valid user account; user interaction is required through the victim loading the repository. The CVSS v3 vector is AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L, indicating a moderate severity [3].
Impact
Successful exploitation allows the attacker to execute arbitrary Ruby code with the privileges of the victim's application. This can lead to partial loss of confidentiality, integrity, and availability, as the attacker could read or modify data, or disrupt the application's operation [2][3].
Mitigation
The vulnerability is patched in ruby-git version 1.13.0 [4]. Users should update to this version or later to mitigate the risk. No workarounds are documented, making upgrading the recommended course of action [3][4].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
gitRubyGems | >= 1.2.0, < 1.13.0 | 1.13.0 |
Affected products
2- ruby-git/ruby-gitv5Range: versions prior to v1.13.0
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
7- github.com/advisories/GHSA-pfpr-3463-c6jhghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2022-46648ghsaADVISORY
- github.com/ruby-git/ruby-git/pull/602ghsaWEB
- github.com/ruby-git/ruby-git/releases/tag/v1.13.0ghsaWEB
- github.com/rubysec/ruby-advisory-db/blob/master/gems/git/CVE-2022-46648.ymlghsaWEB
- jvn.jp/en/jp/JVN16765254/index.htmlghsaWEB
- lists.debian.org/debian-lts-announce/2023/01/msg00043.htmlghsamailing-listWEB
News mentions
0No linked articles in our index yet.