VYPR
High severityNVD Advisory· Published Jan 17, 2023· Updated Apr 4, 2025

CVE-2022-46648

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.

PackageAffected versionsPatched versions
gitRubyGems
>= 1.2.0, < 1.13.01.13.0

Affected products

2
  • ghsa-coords
    Range: >= 1.2.0, < 1.13.0
  • ruby-git/ruby-gitv5
    Range: versions prior to v1.13.0

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

7

News mentions

0

No linked articles in our index yet.