Skip to content
Heist/ feed
Back to feed
HighFix available

sudo — security advisory

Type: advisorySources: OSVAdvisory ID: ALPINE-CVE-2023-22809

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.

Products
sudo
Affected versions
Not specified
Fixed versions
1.9.12_p2-r0
CVEs
CVE-2023-22809
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 14:55 UTC · Revision 1

Source evidence

ALPINE-CVE-2023-22809

core-osv · Original source

Published 18 Jan 2023, 17:15 UTC

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.

osv:ALPINE-CVE-2023-22809

sudo

Fixed versions: 1.9.12_p2-r0

sudo

Fixed versions: 1.9.12_p2-r0

Complete source record
{
  "id": "6c7beedef615595a17015ffff3d42d671596d28b80f9ced3dd4f437dce8cb5ea",
  "url": "https://osv.dev/vulnerability/ALPINE-CVE-2023-22809",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "ALPINE-CVE-2023-22809",
    "summary": "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.",
    "evidence": "osv:ALPINE-CVE-2023-22809",
    "products": [
      {
        "name": {
          "value": "sudo",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.9.12_p2-r0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "sudo",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.9.12_p2-r0",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "ALPINE-CVE-2023-22809",
      "aliases": [
        "ALPINE-CVE-2023-22809"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "1.8.0"
                },
                {
                  "fixed": "1.9.12_p2-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "sudo",
            "purl": "pkg:apk/alpine/sudo?arch=source",
            "ecosystem": "Alpine:v3.14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-22809.json"
          },
          "ecosystem_specific": {}
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "1.8.0"
                },
                {
                  "fixed": "1.9.12_p2-r0"
                }
              ]
            }
          ],
          "package": {
            "name": "sudo",
            "purl": "pkg:apk/alpine/sudo?arch=source",
            "ecosystem": "Alpine:v3.15"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/alpine/ALPINE-CVE-2023-22809.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-26T17:17:58.607528689Z",
      "provider": "osv",
      "upstream": [
        "CVE-2023-22809"
      ],
      "references": [
        "https://security.alpinelinux.org/vuln/CVE-2023-22809"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2023-22809",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 454375,
  "published_at": "2023-01-18T17:15:10.353+00:00"
}