Rapid7’s 2026 Global Cybersecurity Summit is now available on-demand.Watch sessions.
Rapid7

vulnerability

Red Hat: CVE-2022-48338: local command injection in ruby-mode.el (Multiple Advisories)

Severity
7
CVSS
(AV:L/AC:M/Au:S/C:C/I:C/A:C)
Published
Feb 20, 2023
Added
May 15, 2023
Modified
Jun 17, 2026

Description

An issue was discovered in GNU Emacs through 28.2. In ruby-mode.el, the ruby-find-library-file function has a local command injection vulnerability. The ruby-find-library-file function is an interactive function, and bound to C-c C-f. Inside the function, the external command gem is called through shell-command-to-string, but the feature-name parameters are not escaped. Thus, malicious Ruby source files may cause commands to be executed.

Solutions

redhat-upgrade-emacsredhat-upgrade-emacs-commonredhat-upgrade-emacs-common-debuginforedhat-upgrade-emacs-debuginforedhat-upgrade-emacs-debugsourceredhat-upgrade-emacs-filesystemredhat-upgrade-emacs-lucidredhat-upgrade-emacs-lucid-debuginforedhat-upgrade-emacs-noxredhat-upgrade-emacs-nox-debuginfo
Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.