Skip to content
Heist/ feed
Back to feed
HighFix available

sudo — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2021-3156

Sudo before 1.9.5p2 contains an off-by-one error that can result in a heap-based buffer overflow, which allows privilege escalation to root via "sudoedit -s" and a command-line argument that ends with a single backslash character.

Products
sudo
Affected versions
Not specified
Fixed versions
1.9.5p1-1.1
CVEs
CVE-2021-3156
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 00:22 UTC · Revision 1

Source evidence

DEBIAN-CVE-2021-3156

core-osv · Original source

Published 26 Jan 2021, 21:15 UTC

Sudo before 1.9.5p2 contains an off-by-one error that can result in a heap-based buffer overflow, which allows privilege escalation to root via "sudoedit -s" and a command-line argument that ends with a single backslash character.

osv:DEBIAN-CVE-2021-3156

sudo

Fixed versions: 1.9.5p1-1.1

sudo

Fixed versions: 1.9.5p1-1.1

sudo

Fixed versions: 1.9.5p1-1.1

Complete source record
{
  "id": "274b53ea5e727d6dc3d530d9f38cbf5e1ab8bf1892aa0a080d642186c08df1ba",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2021-3156",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2021-3156",
    "summary": "Sudo before 1.9.5p2 contains an off-by-one error that can result in a heap-based buffer overflow, which allows privilege escalation to root via \"sudoedit -s\" and a command-line argument that ends with a single backslash character.",
    "evidence": "osv:DEBIAN-CVE-2021-3156",
    "products": [
      {
        "name": {
          "value": "sudo",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.9.5p1-1.1",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "sudo",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.9.5p1-1.1",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      },
      {
        "name": {
          "value": "sudo",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.9.5p1-1.1",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "high",
    "structured": {
      "id": "DEBIAN-CVE-2021-3156",
      "aliases": [
        "DEBIAN-CVE-2021-3156"
      ],
      "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": "0"
                },
                {
                  "fixed": "1.9.5p1-1.1"
                }
              ]
            }
          ],
          "package": {
            "name": "sudo",
            "purl": "pkg:deb/debian/sudo?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-3156.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.9.5p1-1.1"
                }
              ]
            }
          ],
          "package": {
            "name": "sudo",
            "purl": "pkg:deb/debian/sudo?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-3156.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.9.5p1-1.1"
                }
              ]
            }
          ],
          "package": {
            "name": "sudo",
            "purl": "pkg:deb/debian/sudo?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2021-3156.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-23T18:03:14.076812847Z",
      "provider": "osv",
      "upstream": [
        "CVE-2021-3156"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2021-3156"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2021-3156",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 420883,
  "published_at": "2021-01-26T21:15:12.987+00:00"
}