Skip to content
OpenAdvisories
High · 7.3 CVE-2022-48338 EUVD-2022-51038GHSA-hm6m-2xg8-mc5q

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 vulne…

Published Feb 20, 2023 · Updated Mar 18, 2025 · Assigned by mitre

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 emacs 1:28.2+1-11 —
Debian 13 emacs 1:28.2+1-11 —
Debian 12 emacs 1:28.2+1-11 —
Debian 11 emacs 1:27.1+1-3.1+deb11u2 DSA-5360-1
ReleasePackageFixed inAdvisory
Ubuntu 26.10 xemacs21 +1 No fix yet —
Ubuntu 26.04 LTS xemacs21 +1 No fix yet —
Ubuntu 25.10 xemacs21 +1 No fix yet —
Ubuntu 24.04 LTS xemacs21 +1 No fix yet —
Ubuntu 22.04 LTS emacs 1:27.1+1-3ubuntu5.2 USN-7027-1
Ubuntu 22.04 LTS xemacs21 +1 No fix yet —
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS xemacs21 +1 No fix yet —
Ubuntu 18.04 LTS xemacs21 +1 No fix yet —
Ubuntu 16.04 LTS xemacs21 +1 No fix yet —
Ubuntu Pro 24.04 LTS emacs 1:29.3+1-1ubuntu2+esm1 USN-7027-1
Ubuntu Pro 20.04 LTS emacs 1:26.3+1-1ubuntu2+esm1 USN-7027-1
Ubuntu Pro 18.04 LTS emacs25 25.2+1-6ubuntu0.1~esm2 USN-7027-1
Ubuntu Pro 16.04 LTS emacs24 24.5+1-6ubuntu1.1+esm4 USN-7027-1
ReleasePackageFixed inAdvisory
RHEL 9 emacs +4 1:27.2-8.el9_2.1 RHSA-2023:2626

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 emacs +4 1:27.2-8.el9_2.1 ALSA-2023:2626
ReleasePackageFixed inAdvisory
SLES 15 SP4 emacs 27.2-150400.3.6.1 SUSE-SU-2023:0598-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed emacs 28.2-2.1 openSUSE-SU-2024:12721-1
openSUSE Leap 15.4 emacs 27.2-150400.3.6.1 SUSE-SU-2023:0598-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 emacs +6 1:28.2-3.amzn2023.0.3 ALAS2023-2023-122
Amazon Linux 2 emacs +6 1:27.2-4.amzn2.0.3 ALAS2-2023-1981

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) emacs 28.2-4 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 emacs +4 1:27.2-8.el9_2.1 ELSA-2023-2626

Advisories 12

References