CVE-2021-3156

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-3156
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-3156.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2021-3156
Related
Published
2021-01-26T21:15:12Z
Modified
2024-10-12T07:30:17.455943Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Alpine:v3.10 / sudo

Package

Name
sudo
Purl
pkg:apk/alpine/sudo?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.9.5p2-r0

Affected versions

1.*

1.6.9_p17-r1
1.7.0-r0
1.7.1-r0
1.7.2-r0
1.7.2_p1-r0
1.7.2_p2-r0
1.7.2_p4-r0
1.7.2_p5-r0
1.7.2_p6-r0
1.7.2_p6-r1
1.7.2_p7-r0
1.7.3-r0
1.7.4_p2-r0
1.7.4_p3-r0
1.7.4_p4-r0
1.7.4_p5-r0
1.7.4p6-r0
1.8.0-r0
1.8.0-r1
1.8.1-r0
1.8.1p1-r0
1.8.2-r0
1.8.3-r0
1.8.3_p1-r0
1.8.3_p2-r0
1.8.3_p2-r1
1.8.4-r0
1.8.4_p1-r0
1.8.4_p2-r0
1.8.4_p4-r0
1.8.5_p1-r0
1.8.5_p2-r0
1.8.5_p3-r0
1.8.6-r0
1.8.6_p1-r0
1.8.6_p3-r0
1.8.6_p4-r0
1.8.6_p5-r0
1.8.6_p6-r0
1.8.6_p7-r0
1.8.6_p8-r0
1.8.7-r0
1.8.8-r0
1.8.9_p4-r0
1.8.9_p5-r0
1.8.10-r0
1.8.10_p1-r0
1.8.10_p2-r0
1.8.10_p3-r0
1.8.11_p2-r0
1.8.12-r0
1.8.13-r0
1.8.14_p3-r0
1.8.14_p3-r1
1.8.15-r0
1.8.15-r1
1.8.16-r0
1.8.17-r0
1.8.17_p1-r0
1.8.18-r0
1.8.18_p1-r0
1.8.19_p1-r0
1.8.19_p2-r0
1.8.20_p1-r0
1.8.20_p2-r0
1.8.21_p2-r0
1.8.21_p2-r1
1.8.21_p2-r2
1.8.22-r2
1.8.23-r2
1.8.25_p1-r2
1.8.27-r0
1.8.27-r1
1.8.27-r2

Alpine:v3.11 / sudo

Package

Name
sudo
Purl
pkg:apk/alpine/sudo?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.8.31-r1

Affected versions

1.*

1.6.9_p17-r1
1.7.0-r0
1.7.1-r0
1.7.2-r0
1.7.2_p1-r0
1.7.2_p2-r0
1.7.2_p4-r0
1.7.2_p5-r0
1.7.2_p6-r0
1.7.2_p6-r1
1.7.2_p7-r0
1.7.3-r0
1.7.4_p2-r0
1.7.4_p3-r0
1.7.4_p4-r0
1.7.4_p5-r0
1.7.4p6-r0
1.8.0-r0
1.8.0-r1
1.8.1-r0
1.8.1p1-r0
1.8.2-r0
1.8.3-r0
1.8.3_p1-r0
1.8.3_p2-r0
1.8.3_p2-r1
1.8.4-r0
1.8.4_p1-r0
1.8.4_p2-r0
1.8.4_p4-r0
1.8.5_p1-r0
1.8.5_p2-r0
1.8.5_p3-r0
1.8.6-r0
1.8.6_p1-r0
1.8.6_p3-r0
1.8.6_p4-r0
1.8.6_p5-r0
1.8.6_p6-r0
1.8.6_p7-r0
1.8.6_p8-r0
1.8.7-r0
1.8.8-r0
1.8.9_p4-r0
1.8.9_p5-r0
1.8.10-r0
1.8.10_p1-r0
1.8.10_p2-r0
1.8.10_p3-r0
1.8.11_p2-r0
1.8.12-r0
1.8.13-r0
1.8.14_p3-r0
1.8.14_p3-r1
1.8.15-r0
1.8.15-r1
1.8.16-r0
1.8.17-r0
1.8.17_p1-r0
1.8.18-r0
1.8.18_p1-r0
1.8.19_p1-r0
1.8.19_p2-r0
1.8.20_p1-r0
1.8.20_p2-r0
1.8.21_p2-r0
1.8.21_p2-r1
1.8.21_p2-r2
1.8.22-r2
1.8.23-r2
1.8.25_p1-r2
1.8.27-r0
1.8.28-r0
1.8.28p1-r0
1.8.29-r0
1.8.29-r1
1.8.29-r2
1.8.31-r0

Alpine:v3.12 / sudo

Package

Name
sudo
Purl
pkg:apk/alpine/sudo?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.9.5p2-r0

Affected versions

1.*

1.6.9_p17-r1
1.7.0-r0
1.7.1-r0
1.7.2-r0
1.7.2_p1-r0
1.7.2_p2-r0
1.7.2_p4-r0
1.7.2_p5-r0
1.7.2_p6-r0
1.7.2_p6-r1
1.7.2_p7-r0
1.7.3-r0
1.7.4_p2-r0
1.7.4_p3-r0
1.7.4_p4-r0
1.7.4_p5-r0
1.7.4p6-r0
1.8.0-r0
1.8.0-r1
1.8.1-r0
1.8.1p1-r0
1.8.2-r0
1.8.3-r0
1.8.3_p1-r0
1.8.3_p2-r0
1.8.3_p2-r1
1.8.4-r0
1.8.4_p1-r0
1.8.4_p2-r0
1.8.4_p4-r0
1.8.5_p1-r0
1.8.5_p2-r0
1.8.5_p3-r0
1.8.6-r0
1.8.6_p1-r0
1.8.6_p3-r0
1.8.6_p4-r0
1.8.6_p5-r0
1.8.6_p6-r0
1.8.6_p7-r0
1.8.6_p8-r0
1.8.7-r0
1.8.8-r0
1.8.9_p4-r0
1.8.9_p5-r0
1.8.10-r0
1.8.10_p1-r0
1.8.10_p2-r0
1.8.10_p3-r0
1.8.11_p2-r0
1.8.12-r0
1.8.13-r0
1.8.14_p3-r0
1.8.14_p3-r1
1.8.15-r0
1.8.15-r1
1.8.16-r0
1.8.17-r0
1.8.17_p1-r0
1.8.18-r0
1.8.18_p1-r0
1.8.19_p1-r0
1.8.19_p2-r0
1.8.20_p1-r0
1.8.20_p2-r0
1.8.21_p2-r0
1.8.21_p2-r1
1.8.21_p2-r2
1.8.22-r2
1.8.23-r2
1.8.25_p1-r2
1.8.27-r0
1.8.28-r0
1.8.28p1-r0
1.8.29-r0
1.8.30-r0
1.8.31-r0
1.8.31p1-r0
1.8.31p1-r1
1.9.0-r0

Alpine:v3.13 / sudo

Package

Name
sudo
Purl
pkg:apk/alpine/sudo?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.9.5p2-r0

Affected versions

1.*

1.6.9_p17-r1
1.7.0-r0
1.7.1-r0
1.7.2-r0
1.7.2_p1-r0
1.7.2_p2-r0
1.7.2_p4-r0
1.7.2_p5-r0
1.7.2_p6-r0
1.7.2_p6-r1
1.7.2_p7-r0
1.7.3-r0
1.7.4_p2-r0
1.7.4_p3-r0
1.7.4_p4-r0
1.7.4_p5-r0
1.7.4p6-r0
1.8.0-r0
1.8.0-r1
1.8.1-r0
1.8.1p1-r0
1.8.2-r0
1.8.3-r0
1.8.3_p1-r0
1.8.3_p2-r0
1.8.3_p2-r1
1.8.4-r0
1.8.4_p1-r0
1.8.4_p2-r0
1.8.4_p4-r0
1.8.5_p1-r0
1.8.5_p2-r0
1.8.5_p3-r0
1.8.6-r0
1.8.6_p1-r0
1.8.6_p3-r0
1.8.6_p4-r0
1.8.6_p5-r0
1.8.6_p6-r0
1.8.6_p7-r0
1.8.6_p8-r0
1.8.7-r0
1.8.8-r0
1.8.9_p4-r0
1.8.9_p5-r0
1.8.10-r0
1.8.10_p1-r0
1.8.10_p2-r0
1.8.10_p3-r0
1.8.11_p2-r0
1.8.12-r0
1.8.13-r0
1.8.14_p3-r0
1.8.14_p3-r1
1.8.15-r0
1.8.15-r1
1.8.16-r0
1.8.17-r0
1.8.17_p1-r0
1.8.18-r0
1.8.18_p1-r0
1.8.19_p1-r0
1.8.19_p2-r0
1.8.20_p1-r0
1.8.20_p2-r0
1.8.21_p2-r0
1.8.21_p2-r1
1.8.21_p2-r2
1.8.22-r2
1.8.23-r2
1.8.25_p1-r2
1.8.27-r0
1.8.28-r0
1.8.28p1-r0
1.8.29-r0
1.8.30-r0
1.8.31-r0
1.8.31p1-r0
1.8.31p1-r1
1.9.0-r0
1.9.1-r0
1.9.3-r0
1.9.3_p1-r0
1.9.4-r0
1.9.4p2-r0
1.9.5-r0
1.9.5p1-r0

Alpine:v3.14 / sudo

Package

Name
sudo
Purl
pkg:apk/alpine/sudo?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.9.5p2-r0

Affected versions

1.*

1.6.9_p17-r1
1.7.0-r0
1.7.1-r0
1.7.2-r0
1.7.2_p1-r0
1.7.2_p2-r0
1.7.2_p4-r0
1.7.2_p5-r0
1.7.2_p6-r0
1.7.2_p6-r1
1.7.2_p7-r0
1.7.3-r0
1.7.4_p2-r0
1.7.4_p3-r0
1.7.4_p4-r0
1.7.4_p5-r0
1.7.4p6-r0
1.8.0-r0
1.8.0-r1
1.8.1-r0
1.8.1p1-r0
1.8.2-r0
1.8.3-r0
1.8.3_p1-r0
1.8.3_p2-r0
1.8.3_p2-r1
1.8.4-r0
1.8.4_p1-r0
1.8.4_p2-r0
1.8.4_p4-r0
1.8.5_p1-r0
1.8.5_p2-r0
1.8.5_p3-r0
1.8.6-r0
1.8.6_p1-r0
1.8.6_p3-r0
1.8.6_p4-r0
1.8.6_p5-r0
1.8.6_p6-r0
1.8.6_p7-r0
1.8.6_p8-r0
1.8.7-r0
1.8.8-r0
1.8.9_p4-r0
1.8.9_p5-r0
1.8.10-r0
1.8.10_p1-r0
1.8.10_p2-r0
1.8.10_p3-r0
1.8.11_p2-r0
1.8.12-r0
1.8.13-r0
1.8.14_p3-r0
1.8.14_p3-r1
1.8.15-r0
1.8.15-r1
1.8.16-r0
1.8.17-r0
1.8.17_p1-r0
1.8.18-r0
1.8.18_p1-r0
1.8.19_p1-r0
1.8.19_p2-r0
1.8.20_p1-r0
1.8.20_p2-r0
1.8.21_p2-r0
1.8.21_p2-r1
1.8.21_p2-r2
1.8.22-r2
1.8.23-r2
1.8.25_p1-r2
1.8.27-r0
1.8.28-r0
1.8.28p1-r0
1.8.29-r0
1.8.30-r0
1.8.31-r0
1.8.31p1-r0
1.8.31p1-r1
1.9.0-r0
1.9.1-r0
1.9.3-r0
1.9.3_p1-r0
1.9.4-r0
1.9.4p2-r0
1.9.5-r0
1.9.5p1-r0

Alpine:v3.15 / sudo

Package

Name
sudo
Purl
pkg:apk/alpine/sudo?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.9.5p2-r0

Affected versions

1.*

1.6.9_p17-r1
1.7.0-r0
1.7.1-r0
1.7.2-r0
1.7.2_p1-r0
1.7.2_p2-r0
1.7.2_p4-r0
1.7.2_p5-r0
1.7.2_p6-r0
1.7.2_p6-r1
1.7.2_p7-r0
1.7.3-r0
1.7.4_p2-r0
1.7.4_p3-r0
1.7.4_p4-r0
1.7.4_p5-r0
1.7.4p6-r0
1.8.0-r0
1.8.0-r1
1.8.1-r0
1.8.1p1-r0
1.8.2-r0
1.8.3-r0
1.8.3_p1-r0
1.8.3_p2-r0
1.8.3_p2-r1
1.8.4-r0
1.8.4_p1-r0
1.8.4_p2-r0
1.8.4_p4-r0
1.8.5_p1-r0
1.8.5_p2-r0
1.8.5_p3-r0
1.8.6-r0
1.8.6_p1-r0
1.8.6_p3-r0
1.8.6_p4-r0
1.8.6_p5-r0
1.8.6_p6-r0
1.8.6_p7-r0
1.8.6_p8-r0
1.8.7-r0
1.8.8-r0
1.8.9_p4-r0
1.8.9_p5-r0
1.8.10-r0
1.8.10_p1-r0
1.8.10_p2-r0
1.8.10_p3-r0
1.8.11_p2-r0
1.8.12-r0
1.8.13-r0
1.8.14_p3-r0
1.8.14_p3-r1
1.8.15-r0
1.8.15-r1
1.8.16-r0
1.8.17-r0
1.8.17_p1-r0
1.8.18-r0
1.8.18_p1-r0
1.8.19_p1-r0
1.8.19_p2-r0
1.8.20_p1-r0
1.8.20_p2-r0
1.8.21_p2-r0
1.8.21_p2-r1
1.8.21_p2-r2
1.8.22-r2
1.8.23-r2
1.8.25_p1-r2
1.8.27-r0
1.8.28-r0
1.8.28p1-r0
1.8.29-r0
1.8.30-r0
1.8.31-r0
1.8.31p1-r0
1.8.31p1-r1
1.9.0-r0
1.9.1-r0
1.9.3-r0
1.9.3_p1-r0
1.9.4-r0
1.9.4p2-r0
1.9.5-r0
1.9.5p1-r0

Debian:11 / sudo

Package

Name
sudo
Purl
pkg:deb/debian/sudo?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.9.5p1-1.1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / sudo

Package

Name
sudo
Purl
pkg:deb/debian/sudo?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.9.5p1-1.1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / sudo

Package

Name
sudo
Purl
pkg:deb/debian/sudo?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.9.5p1-1.1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Git / github.com/millert/sudo

Affected ranges

Type
GIT
Repo
https://github.com/millert/sudo
Events
Type
GIT
Repo
https://github.com/sudo-project/sudo
Events

Affected versions

Other

SUDO_1_9_0
SUDO_1_9_1
SUDO_1_9_2
SUDO_1_9_3
SUDO_1_9_3p1
SUDO_1_9_4
SUDO_1_9_4p1
SUDO_1_9_4p2