CVE-2022-48338Command Injection in Emacs

CWE-77Command Injection9 documents8 sources
Severity
7.3HIGHNVD
EPSS
0.1%
top 65.56%
CISA KEV
Not in KEV
Exploit
No known exploits
Affected products
Timeline
PublishedFeb 20
Latest updateSep 19

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.

CVSS vector

CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:HExploitability: 1.3 | Impact: 5.9

Affected Packages2 packages

Debiangnu/emacs< 1:27.1+1-3.1+deb11u2+3
NVDgnu/emacs28.2

Patches

🔴Vulnerability Details

4
OSV
emacs, emacs24, emacs25 vulnerabilities2024-09-19
GHSA
GHSA-hm6m-2xg8-mc5q: An issue was discovered in GNU Emacs through 282023-02-21
OSV
CVE-2022-48338: An issue was discovered in GNU Emacs through 282023-02-20
CVEList
CVE-2022-48338: An issue was discovered in GNU Emacs through 282023-02-20

📋Vendor Advisories

4
Ubuntu
Emacs vulnerabilities2024-09-19
Red Hat
emacs: local command injection in ruby-mode.el2023-02-21
Microsoft
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 interactiv2023-02-14
Debian
CVE-2022-48338: emacs - An issue was discovered in GNU Emacs through 28.2. In ruby-mode.el, the ruby-fin...2022
CVE-2022-48338 — Command Injection in GNU Emacs | cvebase