OS Command Injection in Emacs - CVE-2022-48337

 

OS Command Injection in Emacs - CVE-2022-48337

Published: February 26, 2023


Vulnerability identifier: #VU72573
CSH Severity: High
CVSS v4: 8.4 [CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2022-48337
CWE-ID: CWE-78
Exploitation vector: Remote access
Exploit availability: No public exploit available

Vulnerability details

The vulnerability allows a remote attacker to execute arbitrary shell commands on the target system.

The vulnerability exists due to improper input validation when parsing name of a source-code file in lib-src/etags.c. A remote attacker can trick the victim use the "etags -u *" command on the directory with attacker controlled content and execute arbitrary OS commands on the target system.



Affected software

Emacs
Operational Decision Manager
Debian Linux
Amazon Linux AMI
Oracle Linux
Gentoo Linux
SUSE Linux Enterprise Server for SAP Applications 15
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise High Performance Computing 15
SUSE Linux Enterprise High Performance Computing 12
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Real Time 15
SUSE Linux Enterprise High Performance Computing LTSS 15
SUSE Linux Enterprise High Performance Computing ESPOS 15
SUSE Linux Enterprise Server for SAP Applications 12
SUSE Linux Enterprise Desktop 15
SUSE CaaS Platform
SUSE Manager Server
SUSE Manager Retail Branch Server
SUSE Manager Proxy
SUSE Enterprise Storage
Red Hat Enterprise Linux for ARM 64
Red Hat Enterprise Linux for Power, little endian
Red Hat Enterprise Linux for IBM z Systems
Red Hat Enterprise Linux for x86_64
Anolis OS
Red Hat Enterprise Linux for x86_64 - Extended Update Support
Red Hat Enterprise Linux Server - AUS
Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
Red Hat Enterprise Linux for Power, little endian - Extended Update Support
Red Hat Enterprise Linux Server - TUS
Red Hat Enterprise Linux for ARM 64 - Extended Update Support
SUSE OpenStack Cloud
SUSE OpenStack Cloud Crowbar
Oracle Solaris
SUSE Linux Enterprise Server 12 SP2 BCL
SUSE Linux Enterprise Server 12 SP4 LTSS
SUSE Linux Enterprise Server 12 SP4 ESPOS
SUSE Linux Enterprise Server 15 SP1 LTSS
SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS
SUSE Linux Enterprise Server 15 SP2 LTSS
SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS
SUSE Linux Enterprise Server 15 SP3 LTSS
Basesystem Module
Desktop Applications Module
openSUSE Leap
Ubuntu
openEuler
Fedora
Red Hat Enterprise Linux Server for Power LE - Update Services for SAP Solutions
emacs24-el (Ubuntu package)
emacs24 (Ubuntu package)
emacs24-bin-common (Ubuntu package)
emacs24-common (Ubuntu package)
emacs25 (Ubuntu package)
emacs25-el (Ubuntu package)
emacs25-common (Ubuntu package)
emacs25-bin-common (Ubuntu package)
emacs (Debian package)
emacs-el (Ubuntu package)
emacs (Ubuntu package)
emacs-common (Ubuntu package)
emacs-bin-common (Ubuntu package)
emacs
emacs-debugsource
emacs-info
emacs-el
emacs-debuginfo
emacs-nox
etags
etags-debuginfo
emacs-x11-debuginfo
emacs-x11
emacs-nox-debuginfo
emacs (Red Hat package)
emacs-common
emacs-devel
emacs-lucid
emacs-terminal
emacs-filesystem
emacs-help
emacs-doc
app-editors/emacs
Red Hat OpenShift Builds
Migration Toolkit for Runtimes
OpenShift Pipelines
Red Hat Advanced Cluster Security for Kubernetes
OpenShift Logging
Netcool Operations Insight
Red Hat OpenShift Dev Spaces
IBM Cloud Pak for Business Automation
IBM Automation Decision Services
Migration Toolkit for Containers
Red Hat OpenShift Container Platform
Red Hat OpenShift GitOps
OpenShift Virtualization
OpenShift Data Foundation (formerly OpenShift Container Storage)
IBM Cloud Pak for Watson AIOps
DB2 Warehouse on Cloud Pak for Data
DB2 on Cloud Pak for Data

How to mitigate CVE-2022-48337

Install updates from vendor's website.

Red Hat OpenShift Builds - update to 1.0.1
Migration Toolkit for Runtimes - update to 1.2.4
Migration Toolkit for Containers - addressed in versions 1.7.15, 1.8.3
Red Hat OpenShift GitOps - update to 1.9.3
OpenShift Pipelines - update to 1.10.6
Red Hat Advanced Cluster Security for Kubernetes - addressed in versions 3.74.8, 4.1.6, 4.3.1
Red Hat OpenShift Container Platform - addressed in versions 4.11.59, 4.13.2, 4.13.45, 4.14.32, 4.14.33, 4.15.3
OpenShift Virtualization - update to 4.12.9
OpenShift Logging - update to 5.7.10
emacs24-el (Ubuntu package) - update to 24.5+1-6ubuntu1.1+esm4
emacs24 (Ubuntu package) - update to 24.5+1-6ubuntu1.1+esm4
emacs24-bin-common (Ubuntu package) - update to 24.5+1-6ubuntu1.1+esm4
emacs24-common (Ubuntu package) - update to 24.5+1-6ubuntu1.1+esm4
emacs25 (Ubuntu package) - update to 25.2+1-6ubuntu0.1~esm2
emacs25-el (Ubuntu package) - update to 25.2+1-6ubuntu0.1~esm2
emacs25-common (Ubuntu package) - update to 25.2+1-6ubuntu0.1~esm2
emacs25-bin-common (Ubuntu package) - update to 25.2+1-6ubuntu0.1~esm2
emacs (Debian package) - addressed in versions 1:26.1+1-3.2+deb10u4, 1:27.1+1-3.1+deb11u2
emacs-el (Ubuntu package) - addressed in versions 1:26.3+1-1ubuntu2+esm1, 1:27.1+1-3ubuntu5.2
emacs (Ubuntu package) - addressed in versions 1:26.3+1-1ubuntu2+esm1, 1:27.1+1-3ubuntu5.2
emacs-common (Ubuntu package) - addressed in versions 1:26.3+1-1ubuntu2+esm1, 1:27.1+1-3ubuntu5.2
emacs-bin-common (Ubuntu package) - addressed in versions 1:26.3+1-1ubuntu2+esm1, 1:27.1+1-3ubuntu5.2
emacs - addressed in versions 24.3-20.25, 28.2-3
emacs-debugsource - addressed in versions 24.3-25.12.1, 25.3-150000.3.15.1, 27.2-150400.3.6.1
emacs-info - addressed in versions 24.3-25.12.1, 25.3-150000.3.15.1, 27.2-150400.3.6.1
emacs-el - addressed in versions 24.3-25.12.1, 25.3-150000.3.15.1, 27.2-150400.3.6.1
emacs-debuginfo - addressed in versions 24.3-25.12.1, 25.3-150000.3.15.1, 27.2-150400.3.6.1
emacs-nox - addressed in versions 24.3-25.12.1, 25.3-150000.3.15.1, 27.2-150400.3.6.1
emacs - addressed in versions 24.3-25.12.1, 25.3-150000.3.15.1, 27.2-150400.3.6.1
etags - addressed in versions 24.3-25.12.1, 25.3-150000.3.15.1, 27.2-150400.3.6.1
etags-debuginfo - addressed in versions 24.3-25.12.1, 25.3-150000.3.15.1, 27.2-150400.3.6.1
emacs-x11-debuginfo - addressed in versions 24.3-25.12.1, 25.3-150000.3.15.1, 27.2-150400.3.6.1
emacs-x11 - addressed in versions 24.3-25.12.1, 25.3-150000.3.15.1, 27.2-150400.3.6.1
emacs-nox-debuginfo - addressed in versions 24.3-25.12.1, 25.3-150000.3.15.1, 27.2-150400.3.6.1
emacs (Red Hat package) - addressed in versions 26.1-10.el8_8.4, 26.1-11.el8, 27.2-8.el9_2.1
emacs-common - update to 27.1-10
emacs-devel - update to 27.1-10
emacs-lucid - update to 27.1-10
emacs - update to 27.1-10
emacs-debuginfo - update to 27.1-10
emacs-nox - update to 27.1-10
emacs-terminal - update to 27.1-10
emacs-filesystem - update to 27.1-10
emacs-help - update to 27.1-10
emacs-debugsource - update to 27.1-10
emacs-terminal - addressed in versions 27.2-8.0.2, 29.1-1
emacs-filesystem - addressed in versions 27.2-8.0.2, 29.1-1
emacs-nox - addressed in versions 27.2-8.0.2, 29.1-1
emacs-lucid - addressed in versions 27.2-8.0.2, 29.1-1
emacs-common - addressed in versions 27.2-8.0.2, 29.1-1
emacs - addressed in versions 27.2-8.0.2, 29.1-1
emacs - addressed in versions 28.3-0.rc1.fc37, 28.3-0.rc1.fc38
emacs-doc - update to 29.1-1
emacs-devel - update to 29.1-1
Netcool Operations Insight - update to 1.6.12
Red Hat OpenShift Dev Spaces - update to 3.15.0
IBM Cloud Pak for Watson AIOps - update to 4.4.0
DB2 Warehouse on Cloud Pak for Data - update to 4.8.2
DB2 on Cloud Pak for Data - update to 4.8.2
OpenShift Data Foundation (formerly OpenShift Container Storage) - update to 4.13.0
Operational Decision Manager - addressed in versions 8.10.5.1 Interim fix 49, 8.11.0.1 Interim fix 26, 8.12.0 Interim fix 8
IBM Cloud Pak for Business Automation - addressed in versions 21.0.3.28, 23.0.1.6
IBM Automation Decision Services - update to 23.0.1 IF006
app-editors/emacs - update to 9.6.23

External References

Related Security Bulletins