Skip to content
OpenAdvisories
High · 7.8 Public exploit CVE-2023-22809 EUVD-2023-26921GHSA-3vwp-294x-6v9c

In Sudo before 1.9.12p2, the sudoedit (aka -e) feature mishandles extra arguments passed in the user-provided environment variables (SUDO_E…

Published Jan 18, 2023 · Updated Apr 4, 2025 · Assigned by mitre

Description

In Sudo before 1.9.12p2, the sudoedit (aka -e) feature mishandles extra arguments passed in the user-provided environment variables (SUDO_EDITOR, VISUAL, and EDITOR), allowing a local attacker to append arbitrary entries to the list of files to process. This can lead to privilege escalation. Affected versions are 1.8.0 through 1.9.12.p1. The problem exists because a user-specified editor may contain a "--" argument that defeats a protection mechanism, e.g., an EDITOR='vim -- /path/to/extra/file' value.

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 sudo 1.9.12p2-1 —
Debian 13 sudo 1.9.12p2-1 —
Debian 12 sudo 1.9.12p2-1 —
Debian 11 sudo 1.9.5p2-3+deb11u1 DSA-5321-1
Debian 10 sudo 1.8.27-1+deb10u5 DLA-3272-1
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS sudo 1.9.9-1ubuntu2.2 USN-5811-1
Ubuntu 20.04 LTS sudo 1.8.31-1ubuntu1.4 USN-5811-1
Ubuntu 18.04 LTS sudo 1.8.21p2-3ubuntu1.5 USN-5811-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 16.04 LTS sudo 1.8.16-0ubuntu1.10+esm1 USN-5811-2
Ubuntu Pro 14.04 LTS sudo 1.8.9p5-1ubuntu1.5+esm7 USN-5811-3
ReleasePackageFixed inAdvisory
RHEL 9 sudo +1 1.9.5p2-7.el9_1.1 RHSA-2023:0282
RHEL 8 sudo 1.8.29-8.el8_7.1 RHSA-2023:0284
RHEL 7 sudo +1 1.8.23-10.el7_9.3 RHSA-2023:0291
Show 14 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Red Hat Rhev Hypervisor 4 redhat-virtualization-host +1 4.5.3-202302150956_8.6 RHSA-2023:0859
RHEL 9.0 EUS sudo +1 1.9.5p2-7.el9_0.2 RHSA-2023:0281
RHEL 8.6 EUS sudo 1.8.29-8.el8_6.1 RHSA-2023:0283
RHEL 8.4 EUS sudo 1.8.29-7.el8_4.2 RHSA-2023:0293
RHEL 8.2 TUS sudo 1.8.29-5.el8_2.2 RHSA-2023:0292
RHEL 8.2 E4S sudo 1.8.29-5.el8_2.2 RHSA-2023:0292
RHEL 8.2 AUS sudo 1.8.29-5.el8_2.2 RHSA-2023:0292
RHEL 8.1 E4S sudo 1.8.25p1-8.el8_1.3 RHSA-2023:0280
RHEL 7.7 TUS sudo +1 1.8.23-4.el7_7.4 RHSA-2023:3276
RHEL 7.7 E4S sudo +1 1.8.23-4.el7_7.4 RHSA-2023:3276
RHEL 7.7 AUS sudo +1 1.8.23-4.el7_7.4 RHSA-2023:3276
RHEL 7.6 AUS sudo +1 1.8.23-3.el7_6.3 RHSA-2023:3262
RHEL 7.4 AUS sudo +1 1.8.19p2-12.el7_4.3 RHSA-2023:3264
RHEL 6 ELS sudo +1 1.8.6p3-29.el6_10.7 RHSA-2023:0287

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 sudo +1 1.9.5p2-7.el9_1.1 ALSA-2023:0282
AlmaLinux 8 sudo 1.8.29-8.el8_7.1 ALSA-2023:0284

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 sudo 1.9.5p2-7.el9_1.1 RLSA-2023:0282
Rocky Linux 8 sudo 1.8.29-8.el8_7.1 RLSA-2023:0284
ReleasePackageFixed inAdvisory
SLES 15 SP4 sudo 1.9.9-150400.4.12.1 SUSE-SU-2023:0114-1
SLES 15 SP3 sudo 1.9.5p2-150300.3.19.1 SUSE-SU-2023:0115-1
SLES 15 SP2 sudo 1.8.27-150000.4.38.1 SUSE-SU-2023:0116-1
SLES 15 SP1 sudo 1.8.27-150000.4.38.1 SUSE-SU-2023:0116-1
SLES 12 SP5 sudo 1.8.27-4.33.1 SUSE-SU-2023:0117-1
Show 22 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP4 sudo 1.8.20p2-3.36.1 SUSE-SU-2023:0101-1
SLES 12 SP2 sudo 1.8.10p3-10.44.1 SUSE-SU-2023:0100-1
SLES for SAP 15 SP3 sudo 1.9.5p2-150300.3.19.1 SUSE-SU-2023:0115-1
SLES for SAP 15 SP2 sudo 1.8.27-150000.4.38.1 SUSE-SU-2023:0116-1
SLES for SAP 15 SP1 sudo 1.8.27-150000.4.38.1 SUSE-SU-2023:0116-1
SLES for SAP 12 SP5 sudo 1.8.27-4.33.1 SUSE-SU-2023:0117-1
SLES for SAP 12 SP4 sudo 1.8.20p2-3.36.1 SUSE-SU-2023:0101-1
SLE Real Time 15 SP3 sudo 1.9.5p2-150300.3.19.1 SUSE-SU-2023:0115-1
SLE Micro 5.3 sudo 1.9.9-150400.4.12.1 SUSE-SU-2023:0114-1
SLE Micro 5.2 sudo 1.9.5p2-150300.3.19.1 SUSE-SU-2023:0115-1
SLE Micro 5.1 sudo 1.9.5p2-150300.3.19.1 SUSE-SU-2023:0115-1
SLE HPC 15 SP3 sudo 1.9.5p2-150300.3.19.1 SUSE-SU-2023:0115-1
SLE HPC 15 SP2 sudo 1.8.27-150000.4.38.1 SUSE-SU-2023:0116-1
SLE HPC 15 SP1 sudo 1.8.27-150000.4.38.1 SUSE-SU-2023:0116-1
SUSE OpenStack Cloud Crowbar 9 sudo 1.8.20p2-3.36.1 SUSE-SU-2023:0101-1
SUSE OpenStack Cloud 9 sudo 1.8.20p2-3.36.1 SUSE-SU-2023:0101-1
SUSE Manager Server 4.2 sudo 1.9.5p2-150300.3.19.1 SUSE-SU-2023:0115-1
SUSE Manager Retail Branch Server 4.2 sudo 1.9.5p2-150300.3.19.1 SUSE-SU-2023:0115-1
SUSE Manager Proxy 4.2 sudo 1.9.5p2-150300.3.19.1 SUSE-SU-2023:0115-1
SUSE Enterprise Storage 7.1 sudo 1.9.5p2-150300.3.19.1 SUSE-SU-2023:0115-1
SUSE Enterprise Storage 7 sudo 1.8.27-150000.4.38.1 SUSE-SU-2023:0116-1
SUSE Enterprise Storage 6 sudo 1.8.27-150000.4.38.1 SUSE-SU-2023:0116-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed sudo 1.9.12p2-1.1 openSUSE-SU-2024:12638-1
openSUSE Leap 15.4 sudo 1.9.9-150400.4.12.1 SUSE-SU-2023:0114-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
openSUSE Leap Micro 5.3 sudo 1.9.9-150400.4.12.1 SUSE-SU-2023:0114-1
openSUSE Leap Micro 5.2 sudo 1.9.5p2-150300.3.19.1 SUSE-SU-2023:0115-1
ReleasePackageFixed inAdvisory
Alpine v3.24 sudo 1.9.12_p2-r0 —
Alpine v3.23 sudo 1.9.12_p2-r0 —
Alpine v3.22 sudo 1.9.12_p2-r0 —
Alpine v3.21 sudo 1.9.12_p2-r0 —
Alpine v3.20 sudo 1.9.12_p2-r0 —
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 sudo 1.9.12_p2-r0 —
Alpine v3.18 sudo 1.9.12_p2-r0 —
Alpine v3.17 sudo 1.9.12_p2-r0 —
Alpine v3.15 sudo 1.9.12_p2-r0 —
Alpine v3.14 sudo 1.9.12_p2-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 sudo +3 1.9.12-1.p2.amzn2023.0.2 ALAS2023-2023-106
Amazon Linux 2 sudo +1 1.8.23-10.amzn2.3.1 ALAS2-2023-1985

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) sudo 1.9.12p2-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 sudo +1 1.9.5p2-7.el9_1.1 ELSA-2023-0282
Oracle Linux 8 sudo +1 1.8.6p3-29.0.4.el6_10.3 ELSA-2023-12143, ELSA-2023-0284
Oracle Linux 7 sudo +1 1.8.23-10.el7_9.3 ELSA-2023-0291

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 1 module

Exploit-DB 1

GitHub 12 repositories · most starred shown

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 47

References