Arbitrary Command Injection Affecting emacs-filesystem package, versions <1:27.2-8.el9_2.1


Severity

Recommended
0.0
high
0
10

Based on Red Hat Enterprise Linux security rating.

Threat Intelligence

EPSS
1.64% (74th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RHEL9-EMACSFILESYSTEM-12318669
  • published1 Sept 2025
  • disclosed21 Feb 2023

Introduced: 21 Feb 2023

CVE-2022-48338  (opens in a new tab)
CWE-77  (opens in a new tab)

How to fix?

Upgrade RHEL:9 emacs-filesystem to version 1:27.2-8.el9_2.1 or higher.
This issue was patched in RHSA-2023:2626.

NVD Description

Note: Versions mentioned in the description apply only to the upstream emacs-filesystem package and not the emacs-filesystem package as distributed by RHEL. See How to fix? for RHEL:9 relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1