CVE-2022-48338: GNU Emacs

High severity, CVSS 7.3. EPSS: 1.6% chance of exploitation in the next 30 days.

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.

Affected products

  • GNU Emacs: up to and including 28.2

Published 2023-02-20. Last modified 2026-06-17.