cve.bz

CVE-2023-22809 Improper Privilege Management

7.8 highExploitEPSS 55%

High (7.8). EPSS 55% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
55% (unchanged from 55% a week ago; 55% 30 days ago) estimated probability of exploitation activity in the next 30 days; 99th percentile. Scored 2026-11-21. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2025-04-04. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-269 Improper Privilege Management
OWASP Top 10
A06:2025 Insecure Design
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2023-22809 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2023-22809?via=ask-ai-copy and https://cve.bz/cve/CVE-2023-22809?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2023-22809 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
sudo_project:sudofrom 1.8.0 before 1.9.12
sudo_project:sudo1.9.12
sudo_project:sudo1.9.12:p1
debian:debian_linux10.0
debian:debian_linux11.0
fedoraproject:fedora36
fedoraproject:fedora37
apple:macosbefore 13.4

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian10sudo1.8.27-1+deb10u5DLA-3272-1
Debian11sudo1.9.5p2-3+deb11u1DSA-5321-1
Debian12, 13, 14sudo1.9.12p2-1DEBIAN-CVE-2023-22809
Ubuntu18.04:LTSsudo1.8.21p2-3ubuntu1.5UBUNTU-CVE-2023-22809 USN-5811-1
Ubuntu20.04:LTSsudo1.8.31-1ubuntu1.4UBUNTU-CVE-2023-22809 USN-5811-1
Ubuntu22.04:LTSsudo1.9.9-1ubuntu2.2UBUNTU-CVE-2023-22809 USN-5811-1
UbuntuPro:14.04:LTSsudo1.8.9p5-1ubuntu1.5+esm7UBUNTU-CVE-2023-22809 USN-5811-3
UbuntuPro:16.04:LTSsudo1.8.16-0ubuntu1.10+esm1UBUNTU-CVE-2023-22809 USN-5811-2
Red Hatenterprise_linux:7::client, enterprise_linux:7::server, enterprise_linux:7::workstationsudo, sudo-devel, sudo-debuginfo0:1.8.23-10.el7_9.3RHSA-2023:0291
Red Hatenterprise_linux:7::computenodesudo-devel, sudo-debuginfo0:1.8.23-10.el7_9.3RHSA-2023:0291
Red Hatenterprise_linux:8::baseossudo, sudo-debuginfo, sudo-debugsource0:1.8.29-8.el8_7.1RHSA-2023:0284
Red Hatenterprise_linux:9::appstreamsudo-debuginfo, sudo-debugsource, sudo-python-plugin and 1 more0:1.9.5p2-7.el9_1.1RHSA-2023:0282
Red Hatenterprise_linux:9::baseossudo, sudo-debuginfo, sudo-debugsource and 1 more0:1.9.5p2-7.el9_1.1RHSA-2023:0282
Red Hatrhel_aus:7.4::serversudo, sudo-devel, sudo-debuginfo0:1.8.19p2-12.el7_4.3RHSA-2023:3264
Red Hatrhel_aus:7.6::serversudo, sudo-devel, sudo-debuginfo0:1.8.23-3.el7_6.3RHSA-2023:3262
Red Hatrhel_aus:7.7::server, rhel_e4s:7.7::server, rhel_tus:7.7::serversudo, sudo-devel, sudo-debuginfo0:1.8.23-4.el7_7.4RHSA-2023:3276
Red Hatrhel_aus:8.2::baseos, rhel_e4s:8.2::baseos, rhel_tus:8.2::baseossudo, sudo-debuginfo, sudo-debugsource0:1.8.29-5.el8_2.2RHSA-2023:0292
Red Hatrhel_e4s:8.1::baseossudo, sudo-debuginfo, sudo-debugsource0:1.8.25p1-8.el8_1.3RHSA-2023:0280
Red Hatrhel_els:6sudo, sudo-devel, sudo-debuginfo0:1.8.6p3-29.el6_10.7RHSA-2023:0287
Red Hatrhel_eus:8.4::baseossudo, sudo-debuginfo, sudo-debugsource0:1.8.29-7.el8_4.2RHSA-2023:0293
4 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 6, Enterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-LTSS and 5 moresudo1.8.27-150000.4.38.1SUSE-SU-2023:0116-1
SUSEEnterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-ESPOS, Linux Enterprise High Performance Computing 15 SP3-LTSS and 8 moresudo1.9.5p2-150300.3.19.1SUSE-SU-2023:0115-1
SUSELinux Enterprise Micro 5.3, Linux Enterprise Module for Basesystem 15 SP4sudo1.9.9-150400.4.12.1SUSE-SU-2023:0114-1
SUSELinux Enterprise Server 12 SP2-BCLsudo1.8.10p3-10.44.1SUSE-SU-2023:0100-1
SUSELinux Enterprise Server 12 SP4-LTSS, Linux Enterprise Server for SAP Applications 12 SP4, OpenStack Cloud 9 and 1 moresudo1.8.20p2-3.36.1SUSE-SU-2023:0101-1
SUSELinux Enterprise Server 12 SP5, Linux Enterprise Server for SAP Applications 12 SP5, Linux Enterprise Software Development Kit 12 SP5sudo1.8.27-4.33.1SUSE-SU-2023:0117-1
openSUSELeap 15.4, Leap Micro 5.3sudo1.9.9-150400.4.12.1SUSE-SU-2023:0114-1
openSUSELeap Micro 5.2sudo1.9.5p2-150300.3.19.1SUSE-SU-2023:0115-1
openSUSETumbleweedsudo1.9.12p2-1.1openSUSE-SU-2024:12638-1
AlmaLinux8sudo1.8.29-8.el8_7.1ALSA-2023:0284
AlmaLinux9sudo, sudo-python-plugin1.9.5p2-7.el9_1.1ALSA-2023:0282
Rocky Linux8sudo0:1.8.29-8.el8_7.1RLSA-2023:0284
Rocky Linux9sudo0:1.9.5p2-7.el9_1.1RLSA-2023:0282
Alpinev3.14, v3.15, v3.17 and 7 moresudo1.9.12_p2-r0ALPINE-CVE-2023-22809
Azure Linux2sudo1.9.12p2-1AZL-13030

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's mitigation

It is possible to prevent a user-specified editor from being used by sudoedit by adding the following line to the sudoers file.

~~~

Defaults!sudoedit env_delete+="SUDO_EDITOR VISUAL EDITOR"

~~~

To restrict the editor when editing specific files, a Cmnd_Alias can be used, for example:

~~~

Cmnd_Alias EDIT_MOTD = sudoedit /etc/motd

Defaults!EDIT_MOTD env_delete+="SUDO_EDITOR VISUAL EDITOR"

user ALL = EDIT_MOTD

~~~

But if possible please update the affected package as soon as possible.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6 Extended Lifecycle Supportsudo-0:1.8.6p3-29.el6_10.7Fixed 2023-01-23RHSA-2023:0287
Red Hat Enterprise Linux 7sudo-0:1.8.23-10.el7_9.3Fixed 2023-01-23RHSA-2023:0291
Red Hat Enterprise Linux 7.4 Advanced Update Supportsudo-0:1.8.19p2-12.el7_4.3Fixed 2023-05-23RHSA-2023:3264
Red Hat Enterprise Linux 7.6 Advanced Update Supportsudo-0:1.8.23-3.el7_6.3Fixed 2023-05-23RHSA-2023:3262
Red Hat Enterprise Linux 7.7 Advanced Update Supportsudo-0:1.8.23-4.el7_7.4Fixed 2023-05-23RHSA-2023:3276
Red Hat Enterprise Linux 7.7 Telco Extended Update Supportsudo-0:1.8.23-4.el7_7.4Fixed 2023-05-23RHSA-2023:3276
Red Hat Enterprise Linux 7.7 Update Services for SAP Solutionssudo-0:1.8.23-4.el7_7.4Fixed 2023-05-23RHSA-2023:3276
Red Hat Enterprise Linux 8sudo-0:1.8.29-8.el8_7.1Fixed 2023-01-23RHSA-2023:0284
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutionssudo-0:1.8.25p1-8.el8_1.3Fixed 2023-01-23RHSA-2023:0280
Red Hat Enterprise Linux 8.2 Advanced Update Supportsudo-0:1.8.29-5.el8_2.2Fixed 2023-01-23RHSA-2023:0292
Red Hat Enterprise Linux 8.2 Telecommunications Update Servicesudo-0:1.8.29-5.el8_2.2Fixed 2023-01-23RHSA-2023:0292
Red Hat Enterprise Linux 8.2 Update Services for SAP Solutionssudo-0:1.8.29-5.el8_2.2Fixed 2023-01-23RHSA-2023:0292
Red Hat Enterprise Linux 8.4 Extended Update Supportsudo-0:1.8.29-7.el8_4.2Fixed 2023-01-23RHSA-2023:0293
Red Hat Enterprise Linux 8.6 Extended Update Supportsudo-0:1.8.29-8.el8_6.1Fixed 2023-01-23RHSA-2023:0283
Red Hat Enterprise Linux 9sudo-0:1.9.5p2-7.el9_1.1Fixed 2023-01-23RHSA-2023:0282
Red Hat Enterprise Linux 9.0 Extended Update Supportsudo-0:1.9.5p2-7.el9_0.2Fixed 2023-01-23RHSA-2023:0281
Red Hat Virtualization 4 for Red Hat Enterprise Linux 8redhat-virtualization-host-0:4.5.3-202302150956_8.6Fixed 2023-02-21RHSA-2023:0859

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2023-22809.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-25-105-08ABB M2M Gateway2025-04-07EnergyABB M2M Gateway ARM600, firmware versions = 4.1.2 <= 5.0.3, ABB M2M Gateway SW, software versions = 5.0.1 <= 5.0.3none listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

Public exploits

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

Attack patterns (CAPEC)

  • CAPEC-58 Restful Privilege Elevation Likelihood: High · Severity: High
  • CAPEC-122 Privilege Abuse Likelihood: High · Severity: Medium
  • CAPEC-233 Privilege Escalation

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON