RCE in GNU Emacs

CVE-2022-48338

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.

Vulnerability class: Command Injection (OS Command Injection)

EPSS: 0.016 (75.2th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 7.3 (High). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H.

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2022-48338?
CVE-2022-48338 is a high-severity vulnerability in GNU Emacs, classified under Command Injection. CVSS score: 7.3/10. Published 2023-02-20.
How severe is CVE-2022-48338?
High severity. CVSS v3 base score is 7.3 out of 10.