CVE-2022-45939 json
GNU Emacs through 28.2 allows attackers to execute commands via shell metacharacters in the name of a source-code file, because lib-src/eta…
published 3y ago modified 4mo ago also EUVD-2022-48781
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.7%
- EPSS 0.7% chance of exploitation in 30 days, percentile 52%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- emacs Debian 14, Debian 13, Debian 12 1:28.2+1-8
- xemacs21 Debian 12 21.4.24-11
debian advisories DEBIAN-CVE-2022-45939
- emacs Ubuntu 22.04 LTS 1:27.1+1-3ubuntu5.2
- emacs Ubuntu Pro 20.04 LTS 1:26.3+1-1ubuntu2+esm1
- emacs24 Ubuntu Pro 16.04 LTS 24.5+1-6ubuntu1.1+esm1
- emacs25 Ubuntu Pro 18.04 LTS 25.2+1-6ubuntu0.1~esm2
ubuntu advisories UBUNTU-CVE-2022-45939
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- emacs RHEL 8 1:26.1-9.el8
- emacs-nox RHEL 8 1:26.1-9.el8
- emacs-lucid RHEL 8 1:26.1-9.el8
- emacs-common RHEL 8 1:26.1-9.el8
- emacs-terminal RHEL 8 1:26.1-9.el8
- emacs-filesystem RHEL 8 1:26.1-9.el8
- emacs RHEL 9 1:27.2-8.el9
- emacs-nox RHEL 9 1:27.2-8.el9
red hat advisories RHSA-2024:1103RHSA-2023:3042RHSA-2023:2366
- emacs SLES for SAP 15 SP2, SLES for SAP 15 SP1, SLES for SAP 15 +19 more 25.3-150000.3.12.1
- emacs SLES for SAP 12 SP5, SLES for SAP 12 SP4, SLES 12 SP5 +5 more 24.3-25.9.1
- emacs SLE Module for Desktop Applications 15 SP4, SLE Module for Basesystem 15 SP4, openSUSE Leap 15.4 27.2-150400.3.3.1
suse advisories SUSE-SU-2022:4310-1SUSE-SU-2022:4305-1SUSE-SU-2022:4304-1
- emacs openSUSE Tumbleweed 28.2-1.1
opensuse advisories openSUSE-SU-2024:12541-1
- emacs AlmaLinux 8 1:26.1-9.el8
- emacs-nox AlmaLinux 8 1:26.1-9.el8
- emacs-lucid AlmaLinux 8 1:26.1-9.el8
- emacs-common AlmaLinux 8 1:26.1-9.el8
- emacs-terminal AlmaLinux 8 1:26.1-9.el8
- emacs-filesystem AlmaLinux 8 1:26.1-9.el8
- emacs AlmaLinux 9 1:27.2-8.el9
- emacs-nox AlmaLinux 9 1:27.2-8.el9
almalinux advisories ALSA-2023:3042ALSA-2023:2366
- emacs Alpine 3.17 28.2-r1
- emacs Alpine 3.24, Alpine 3.23, Alpine 3.22 +4 more 28.2-r3
alpine advisories ALPINE-CVE-2022-45939
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
Is CVE-2022-45939 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-45939 updated cvss 7.8
emacs: ctags local command execution vulnerability
-
Red Hat Enterprise Linux 6 emacs, emacs-el, emacs-nox, emacs-common Red Hat Enterprise Linux 7 emacs, emacs-el, emacs-nox, emacs-common, emacs-terminal, emacs-filesystemaffected: workaround, no fix planned “Do not run Etags with untrusted input, in an untrusted directory or set of files, for example.”
-
Red Hat Enterprise Linux AppStream (v. 8) emacs 26.1-9.el8, emacs-nox 26.1-9.el8, emacs-lucid 26.1-9.el8, emacs-common 26.1-9.el8, emacs-terminal 26.1-9.el8fixed: vendor fix “Do not run Etags with untrusted input, in an untrusted directory or set of files, for example.” RHSA-2023:3042
-
Red Hat Enterprise Linux AppStream (v. 9) emacs 27.2-8.el9, emacs-nox 27.2-8.el9, emacs-lucid 27.2-8.el9, emacs-common 27.2-8.el9, emacs-filesystem 27.2-8.el9fixed: vendor fix “Do not run Etags with untrusted input, in an untrusted directory or set of files, for example.” RHSA-2023:2366
-
Red Hat Enterprise Linux AppStream EUS (v.8.6) emacs 26.1-7.el8_6.3, emacs-nox 26.1-7.el8_6.3, emacs-lucid 26.1-7.el8_6.3, emacs-common 26.1-7.el8_6.3, emacs-terminal 26.1-7.el8_6.3fixed: vendor fix “Do not run Etags with untrusted input, in an untrusted directory or set of files, for example.” RHSA-2024:1103
-
Red Hat Enterprise Linux BaseOS (v. 8) emacs 26.1-9.el8, emacs-filesystem 26.1-9.el8fixed: vendor fix “Do not run Etags with untrusted input, in an untrusted directory or set of files, for example.” RHSA-2023:3042
-
Red Hat Enterprise Linux BaseOS EUS (v.8.6) emacs 26.1-7.el8_6.3, emacs-filesystem 26.1-7.el8_6.3fixed: vendor fix “Do not run Etags with untrusted input, in an untrusted directory or set of files, for example.” RHSA-2024:1103
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- last yr.
Exploit prediction
0.67% chance of exploitation in the next 30 days, higher than 52% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CISA ADP | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Classification
- Weakness
-
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
References
-
git.savannah.gnu.org
/cgit/emacs.git/commit/?id=d48bb4874bc6cd3e69c7a15fc3c91cc141025c51
patch
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/GOXIH2FDEQJEAARE52C3GHTLGQFBYPIB/
vendor-advisory
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/FOSK3J7BBAEI4IITW2DRUKLQYUZYKH6Y/
vendor-advisory
-
debian.org
/security/2023/dsa-5314
vendor-advisory, third-party-advisory
-
lists.debian.org
/debian-lts-announce/2022/12/msg00046.html
mailing-list, third-party-advisory
Sources
- CVE List CVE-2022-45939
- NVD CVE-2022-45939
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.