Vulnerability · Published Nov 28, 2022 · Assigned by mitre
CVE-2022-45939
High 7.8
In plain English
A high-severity OS command injection in the emacs package (AlmaLinux). There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 52% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
GNU Emacs through 28.2 allows attackers to execute commands via shell metacharacters in the name of a source-code file, because lib-src/etags.c uses the system C library function in its implementation of the ctags program. For example, a victim may use the "ctags *" command (suggested in the ctags documentation) in a situation where the current working directory has contents that depend on untrusted input.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | emacs | 1:26.1-9.el8 | ALSA-2023:3042 |
| AlmaLinux:9 | emacs | 1:27.2-8.el9 | ALSA-2023:2366 |
| AlmaLinux:8 | emacs-common | 1:26.1-9.el8 | ALSA-2023:3042 |
| AlmaLinux:9 | emacs-common | 1:27.2-8.el9 | ALSA-2023:2366 |
| AlmaLinux:8 | emacs-filesystem | 1:26.1-9.el8 | ALSA-2023:3042 |
| AlmaLinux:9 | emacs-filesystem | 1:27.2-8.el9 | ALSA-2023:2366 |
| AlmaLinux:8 | emacs-lucid | 1:26.1-9.el8 | ALSA-2023:3042 |
| AlmaLinux:9 | emacs-lucid | 1:27.2-8.el9 | ALSA-2023:2366 |
| AlmaLinux:8 | emacs-nox | 1:26.1-9.el8 | ALSA-2023:3042 |
| AlmaLinux:9 | emacs-nox | 1:27.2-8.el9 | ALSA-2023:2366 |
| AlmaLinux:8 | emacs-terminal | 1:26.1-9.el8 | ALSA-2023:3042 |
| Alpine:v3.20 | emacs | 28.2-r3 | ALPINE-CVE-2022-45939 |
| Alpine:v3.21 | emacs | 28.2-r3 | ALPINE-CVE-2022-45939 |
| Alpine:v3.22 | emacs | 28.2-r3 | ALPINE-CVE-2022-45939 |
| Alpine:v3.23 | emacs | 28.2-r3 | ALPINE-CVE-2022-45939 |
| Alpine:v3.24 | emacs | 28.2-r3 | ALPINE-CVE-2022-45939 |
| Debian:12 | emacs | 1:28.2+1-8 | DEBIAN-CVE-2022-45939 |
| Debian:13 | emacs | 1:28.2+1-8 | DEBIAN-CVE-2022-45939 |
| Debian:14 | emacs | 1:28.2+1-8 | DEBIAN-CVE-2022-45939 |
| Debian:12 | xemacs21 | 21.4.24-11 | DEBIAN-CVE-2022-45939 |
| Ubuntu:22.04:LTS | emacs | 1:27.1+1-3ubuntu5.2 | USN-7027-1 |
| Ubuntu:22.04:LTS | emacs | 1:27.1+1-3ubuntu5.2 | UBUNTU-CVE-2022-45939 |
| Ubuntu:22.04:LTS | xemacs21 | no fix listed | UBUNTU-CVE-2022-45939 |
| Ubuntu:24.04:LTS | xemacs21 | no fix listed | UBUNTU-CVE-2022-45939 |
| Ubuntu:25.10 | xemacs21 | no fix listed | UBUNTU-CVE-2022-45939 |
| Ubuntu:26.04:LTS | xemacs21 | no fix listed | UBUNTU-CVE-2022-45939 |
| Ubuntu:26.10 | xemacs21 | no fix listed | UBUNTU-CVE-2022-45939 |
| Ubuntu:22.04:LTS | xemacs21-packages | no fix listed | UBUNTU-CVE-2022-45939 |
| Ubuntu:24.04:LTS | xemacs21-packages | no fix listed | UBUNTU-CVE-2022-45939 |
| Ubuntu:25.10 | xemacs21-packages | no fix listed | UBUNTU-CVE-2022-45939 |
| Ubuntu:26.04:LTS | xemacs21-packages | no fix listed | UBUNTU-CVE-2022-45939 |
| Ubuntu:26.10 | xemacs21-packages | no fix listed | UBUNTU-CVE-2022-45939 |
Affected products (as reported)
Weakness: CWE-78 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
References
- https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51
- [debian-lts-announce] 20221231 [SECURITY] [DLA 3257-1] emacs security update mailing-list
- FEDORA-2022-d69c7f95a4 vendor-advisory
- FEDORA-2022-e37f239f2e vendor-advisory
- DSA-5314 vendor-advisory