Skip to content
OpenAdvisories
High · 7.8 CVE-2022-45939 EUVD-2022-48781GHSA-m57w-hf24-4j3h

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 Nov 28, 2022 · Updated Apr 28, 2025 · Assigned by mitre

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 emacs 1:28.2+1-8 —
Debian 13 emacs 1:28.2+1-8 —
Debian 12 emacs 1:28.2+1-8 —
Debian 12 xemacs21 21.4.24-11 —
Debian 11 emacs 1:27.1+1-3.1+deb11u1 DSA-5314-1
Debian 10 emacs 1:26.1+1-3.2+deb10u3 DLA-3257-1
ReleasePackageFixed inAdvisory
Ubuntu 26.10 xemacs21 +1 No fix yet —
Ubuntu 26.04 LTS xemacs21 +1 No fix yet —
Ubuntu 25.10 xemacs21 +1 No fix yet —
Ubuntu 24.04 LTS xemacs21 +1 No fix yet —
Ubuntu 22.04 LTS emacs 1:27.1+1-3ubuntu5.2 USN-7027-1
Ubuntu 22.04 LTS xemacs21 +1 No fix yet —
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS xemacs21 +1 No fix yet —
Ubuntu 18.04 LTS xemacs21 +1 No fix yet —
Ubuntu 16.04 LTS xemacs21 +1 No fix yet —
Ubuntu Pro 24.04 LTS emacs 1:29.3+1-1ubuntu2+esm1 USN-7027-1
Ubuntu Pro 20.04 LTS emacs 1:26.3+1-1ubuntu2+esm1 USN-7027-1
Ubuntu Pro 18.04 LTS emacs25 25.2+1-6ubuntu0.1~esm2 USN-7027-1
Ubuntu Pro 16.04 LTS emacs24 24.5+1-6ubuntu1.1+esm1 USN-7027-1, USN-5781-1
ReleasePackageFixed inAdvisory
RHEL 9 emacs +4 1:27.2-8.el9 RHSA-2023:2366
RHEL 8 emacs +5 1:26.1-9.el8 RHSA-2023:3042
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 8.6 EUS emacs +5 1:26.1-7.el8_6.3 RHSA-2024:1103

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 emacs +4 1:27.2-8.el9 ALSA-2023:2366
AlmaLinux 8 emacs +5 1:26.1-9.el8 ALSA-2023:3042
ReleasePackageFixed inAdvisory
SLES 15 SP4 emacs 27.2-150400.3.3.1 SUSE-SU-2022:4304-1
SLES 15 SP3 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SLES 15 SP2 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SLES 15 SP1 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SLES 15 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
Show 19 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP5 emacs 24.3-25.9.1 SUSE-SU-2022:4305-1
SLES 12 SP4 emacs 24.3-25.9.1 SUSE-SU-2022:4305-1
SLES 12 SP3 emacs 24.3-25.9.1 SUSE-SU-2022:4305-1
SLES 12 SP2 emacs 24.3-25.9.1 SUSE-SU-2022:4305-1
SLES for SAP 15 SP2 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SLES for SAP 15 SP1 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SLES for SAP 15 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SLES for SAP 12 SP5 emacs 24.3-25.9.1 SUSE-SU-2022:4305-1
SLES for SAP 12 SP4 emacs 24.3-25.9.1 SUSE-SU-2022:4305-1
SLE HPC 15 SP2 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SLE HPC 15 SP1 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SLE HPC 15 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SUSE OpenStack Cloud Crowbar 9 emacs 24.3-25.9.1 SUSE-SU-2022:4305-1
SUSE OpenStack Cloud 9 emacs 24.3-25.9.1 SUSE-SU-2022:4305-1
SUSE Manager Server 4.1 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SUSE Manager Retail Branch Server 4.1 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SUSE Manager Proxy 4.1 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SUSE Enterprise Storage 7 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
SUSE Enterprise Storage 6 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed emacs 28.2-1.1 openSUSE-SU-2024:12541-1
openSUSE Leap 15.4 emacs 27.2-150400.3.3.1 SUSE-SU-2022:4304-1
openSUSE Leap 15.3 emacs 25.3-150000.3.12.1 SUSE-SU-2022:4310-1
ReleasePackageFixed inAdvisory
Alpine v3.24 emacs 28.2-r3 —
Alpine v3.23 emacs 28.2-r3 —
Alpine v3.22 emacs 28.2-r3 —
Alpine v3.21 emacs 28.2-r3 —
Alpine v3.20 emacs 28.2-r3 —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 emacs 28.2-r3 —
Alpine v3.18 emacs 28.2-r3 —
Alpine v3.17 emacs 28.2-r1 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 emacs +6 1:28.1-2.amzn2023.0.2 ALAS2023-2023-108
Amazon Linux 2 emacs +6 1:27.2-4.amzn2.0.2 ALAS2-2023-1928

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) emacs 28.1-5 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 emacs +4 1:27.2-8.el9 ELSA-2023-2366
Oracle Linux 8 emacs +5 1:26.1-9.el8 ELSA-2023-3042

Advisories 20

References