CVE-2022-4515 Command injection in Exuberant Ctags

High 7.8 Published Updated

A command injection vulnerability in Exuberant Ctags allows arbitrary code execution via a crafted tag filename passed to the -o option.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2022-4515?

CVE-2022-4515 is a high-severity command injection vulnerability in Debian Debian Linux, published on 20 Dec 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

A flaw was found in Exuberant Ctags in the way it handles the "-o" option. This option specifies the tag filename. A crafted tag filename specified in the command line or in the configuration file results in arbitrary command execution because the externalSortTags() in sort.c calls the system(3) function in an unsafe way.

Weakness: CWE-78

Which versions are affected by CVE-2022-4515?

It affects 2 products.

Linux distribution packages (33)
ctags AlmaLinux:8All versions5.8-23.el8
ctags-etags AlmaLinux:8All versions5.8-23.el8
ctags Red Hat:enterprise_linux:8::appstreamAll versions0:5.8-23.el8
ctags-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:5.8-23.el8
ctags-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:5.8-23.el8
ctags-debuginfo Red Hat:enterprise_linux:8::crbAll versions0:5.8-23.el8
ctags-debugsource Red Hat:enterprise_linux:8::crbAll versions0:5.8-23.el8
ctags-etags Red Hat:enterprise_linux:8::crbAll versions0:5.8-23.el8
ctags Rocky Linux:8All versions0:5.8-23.el8
ctags SUSE:Enterprise Storage 6All versions5.8-150000.3.3.1
ctags SUSE:Enterprise Storage 7All versions5.8-150000.3.3.1
ctags SUSE:Enterprise Storage 7.1All versions5.8-150000.3.3.1
ctags SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSSAll versions5.8-150000.3.3.1
ctags SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSSAll versions5.8-150000.3.3.1
ctags SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOSAll versions5.8-150000.3.3.1
ctags SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSAll versions5.8-150000.3.3.1
ctags SUSE:Linux Enterprise Module for Development Tools 15 SP4All versions5.8-150000.3.3.1
ctags SUSE:Linux Enterprise Real Time 15 SP3All versions5.8-150000.3.3.1
ctags SUSE:Linux Enterprise Server 12 SP2-BCLAll versions5.8-8.3.1
ctags SUSE:Linux Enterprise Server 12 SP4-LTSSAll versions5.8-8.3.1
ctags SUSE:Linux Enterprise Server 12 SP5All versions5.8-8.3.1
ctags SUSE:Linux Enterprise Server 15 SP1-LTSSAll versions5.8-150000.3.3.1
ctags SUSE:Linux Enterprise Server 15 SP2-LTSSAll versions5.8-150000.3.3.1
ctags SUSE:Linux Enterprise Server 15 SP3-LTSSAll versions5.8-150000.3.3.1
ctags SUSE:Linux Enterprise Server for SAP Applications 12 SP4All versions5.8-8.3.1
ctags SUSE:Linux Enterprise Server for SAP Applications 12 SP5All versions5.8-8.3.1
ctags SUSE:Linux Enterprise Server for SAP Applications 15 SP1All versions5.8-150000.3.3.1
ctags SUSE:Linux Enterprise Server for SAP Applications 15 SP2All versions5.8-150000.3.3.1
ctags SUSE:Linux Enterprise Server for SAP Applications 15 SP3All versions5.8-150000.3.3.1
ctags SUSE:OpenStack Cloud 9All versions5.8-8.3.1
ctags SUSE:OpenStack Cloud Crowbar 9All versions5.8-8.3.1
ctags openSUSE:Leap 15.4All versions5.8-150000.3.3.1
ctags openSUSE:TumbleweedAll versions5.8-12.1

Products include Debian Debian Linux, Exuberant Ctags Project Exuberant Ctags.

How do I fix CVE-2022-4515?

Apply the vendor's patch.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2022-4515 being exploited?

There is no known exploitation of CVE-2022-4515 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as ALSA-2023:2863, AZL-12083, AZL-34647, DEBIAN-CVE-2022-4515, DLA-3254-1, GHSA-qr9x-29jh-mg6x and 10 more.

Is CVE-2022-4515 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free