Advisories · Linux & SSH
CVE-2023-22809
High
CVSS 7.8
sudoedit arbitrary file edit
Disclosed 2023 · Last reviewed 2 Dec 2026
A user allowed to sudoedit could add arguments that made sudo edit a file outside the allowed list.
What happened
sudoedit treated extra arguments from the user editor string as its own arguments.
Affected and patched versions
- Affected
- sudo 1.8.0 through 1.9.12p1 when a user is allowed to run sudoedit.
- Patched
- sudo 1.9.12p2 and the distro packages that backported it.
How to check your server
Check
sudo --version
How to fix and harden
- Run sudo --version.
- Upgrade sudo from the distribution. Upstream 1.9.12p2 contains the fix. An older package number can still be safe when the changelog names CVE-2023-22809.
Fix
sudo --version
Sources
Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON