Sudo up to 1.9.12.p1 Environment Variable SUDO_EDITOR/VISUAL/EDITOR protection mechanism
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.9 | $0-$5k | 0.00 |
Summary
A vulnerability categorized as critical has been discovered in Sudo up to 1.9.12.p1. The impacted element is an unknown function of the component Environment Variable Handler. The manipulation of the argument SUDO_EDITOR/VISUAL/EDITOR results in protection mechanism. This vulnerability is known as CVE-2023-22809. It is possible to launch the attack remotely. Furthermore, an exploit is available. It is advisable to implement a patch to correct this issue.
Details
A vulnerability was found in Sudo up to 1.9.12.p1 (Operating System Utility Software). It has been classified as critical. Affected is an unknown functionality of the component Environment Variable Handler. The manipulation of the argument SUDO_EDITOR/VISUAL/EDITOR with an unknown input leads to a protection mechanism vulnerability. CWE is classifying the issue as CWE-693. The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product. This is going to have an impact on confidentiality, integrity, and availability. CVE summarizes:
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.
The weakness was published 01/18/2023. The advisory is shared for download at sudo.ws. This vulnerability is traded as CVE-2023-22809 since 01/06/2023. Technical details and a public exploit are known.
A public exploit has been developed by n3m1.sys in Bash. The exploit is shared for download at github.com. It is declared as proof-of-concept. As 0-day the estimated underground price was around $5k-$25k. The vulnerability scanner Nessus provides a plugin with the ID 240017 (TencentOS Server 3: sudo (TSSA-2023:0015)), which helps to determine the existence of the flaw in a target environment.
Applying the patch 1.9.12p2 is able to eliminate this problem.
The vulnerability is also documented in the databases at Exploit-DB (51217) and Tenable (240017). Once again VulDB remains the best source for vulnerability data.
Product
Type
Name
Version
License
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 8.3VulDB Meta Temp Score: 7.9
VulDB Base Score: 8.8
VulDB Temp Score: 7.9
VulDB Vector: 🔍
VulDB Reliability: 🔍
NVD Base Score: 7.8
NVD Vector: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Protection mechanismCWE: CWE-693
CAPEC: 🔍
ATT&CK: 🔍
Physical: Partially
Local: Yes
Remote: Yes
Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: n3m1.sys
Programming Language: 🔍
Download: 🔍
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 240017
Nessus Name: TencentOS Server 3: sudo (TSSA-2023:0015)
Exploit-DB: 🔍
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: PatchStatus: 🔍
0-Day Time: 🔍
Patch: 1.9.12p2
Timeline
01/06/2023 🔍01/18/2023 🔍
01/18/2023 🔍
06/17/2025 🔍
Sources
Advisory: DLA 3272-1Status: Confirmed
CVE: CVE-2023-22809 (🔍)
GCVE (CVE): GCVE-0-2023-22809
GCVE (VulDB): GCVE-100-218940
scip Labs: https://www.scip.ch/en/?labs.20161013
Entry
Created: 01/18/2023 21:44Updated: 06/17/2025 15:45
Changes: 01/18/2023 21:44 (40), 02/01/2023 10:42 (4), 02/01/2023 10:46 (6), 02/15/2023 09:11 (1), 02/15/2023 09:14 (10), 07/29/2024 12:50 (15), 04/05/2025 03:18 (2), 06/17/2025 15:45 (2)
Complete: 🔍
Committer: mromera
Cache ID: 216::103
Once again VulDB remains the best source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.