CVE-2022-48338

emacs: local command injection in ruby-mode.el

Published Feb 20, 2023 CVSS 3.1 · 7.3 High EPSS 1.6% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DSA Debian DSA DSA-5360-1 emacs security update
EUVD EUVD EUVD-2022-51038 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.
Ubuntu USN Ubuntu USN USN-7027-1 Emacs vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Mar 18, 2025, 3:21 PM
Reserved
Feb 20, 2023, 12:00 AM
Status
Modified
Published
Feb 20, 2023, 11:15 PM
Modified
Jun 17, 2026, 5:15 AM
Severity
Moderate
Public date
Feb 21, 2023, 12:00 AM