# CVE-2019-14287: Privilege escalation in n/a

> Attackers with Runas ALL access can bypass sudo policy restrictions and PAM modules by using a crafted user ID, leading to privilege escalation.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Oct 2019
- **Updated:** 5 Aug 2024
- **Also known as:** ALPINE-CVE-2019-14287, DEBIAN-CVE-2019-14287, DLA-1964-1, DSA-4543-1, GHSA-33h3-qhjg-4qmf, MGASA-2019-0298, RHSA-2019:3197, RHSA-2019:3204, RHSA-2019:3205, RHSA-2019:3209, RHSA-2019:3219, RHSA-2019:3278, RHSA-2019:3694, RHSA-2019:3754, RHSA-2019:3755, RHSA-2019:3895, RHSA-2019:4191, RHSA-2020:0388, SUSE-SU-2019:14193-1, SUSE-SU-2019:2656-1, SUSE-SU-2019:2666-1, SUSE-SU-2019:2667-1, SUSE-SU-2019:2668-1, UBUNTU-CVE-2019-14287, USN-4154-1, openSUSE-SU-2019:2316-1, openSUSE-SU-2019:2333-1

## What is CVE-2019-14287?

CVE-2019-14287 is a high-severity vulnerability in Canonical Ubuntu Linux, published on 17 Oct 2019. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

In Sudo before 1.8.28, an attacker with access to a Runas ALL sudoer account can bypass certain policy blacklists and session PAM modules, and can cause incorrect logging, by invoking sudo with a crafted user ID. For example, this allows bypass of !root configuration, and USER= logging, for a "sudo -u \#$((0xffffffff))" command.

Weakness: CWE-755 (Improper Handling of Exceptional Conditions)

## Which versions are affected by CVE-2019-14287?

It affects 15 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `sudo` | Red Hat:enterprise_linux:6::client | All versions | 0:1.8.6p3-29.el6_10.2 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:6::client | All versions | 0:1.8.6p3-29.el6_10.2 |
| `sudo-devel` | Red Hat:enterprise_linux:6::client | All versions | 0:1.8.6p3-29.el6_10.2 |
| `sudo` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.8.6p3-29.el6_10.2 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.8.6p3-29.el6_10.2 |
| `sudo-devel` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.8.6p3-29.el6_10.2 |
| `sudo` | Red Hat:enterprise_linux:6::server | All versions | 0:1.8.6p3-29.el6_10.2 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:6::server | All versions | 0:1.8.6p3-29.el6_10.2 |
| `sudo-devel` | Red Hat:enterprise_linux:6::server | All versions | 0:1.8.6p3-29.el6_10.2 |
| `sudo` | Red Hat:enterprise_linux:6::workstation | All versions | 0:1.8.6p3-29.el6_10.2 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:6::workstation | All versions | 0:1.8.6p3-29.el6_10.2 |
| `sudo-devel` | Red Hat:enterprise_linux:6::workstation | All versions | 0:1.8.6p3-29.el6_10.2 |
| `sudo` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.23-4.el7_7.1 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.23-4.el7_7.1 |
| `sudo-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.23-4.el7_7.1 |
| `sudo` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.8.23-4.el7_7.1 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.8.23-4.el7_7.1 |
| `sudo-devel` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.8.23-4.el7_7.1 |
| `sudo` | Red Hat:enterprise_linux:7::server | All versions | 0:1.8.23-4.el7_7.1 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 0:1.8.23-4.el7_7.1 |
| `sudo-devel` | Red Hat:enterprise_linux:7::server | All versions | 0:1.8.23-4.el7_7.1 |
| `sudo` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.8.23-4.el7_7.1 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.8.23-4.el7_7.1 |
| `sudo-devel` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.8.23-4.el7_7.1 |
| `sudo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1.8.25p1-8.el8_1 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1.8.25p1-8.el8_1 |
| `sudo-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1.8.25p1-8.el8_1 |
| `sudo` | Red Hat:rhel_aus:6.5::server | All versions | 0:1.8.6p3-12.el6_5.2 |
| `sudo-debuginfo` | Red Hat:rhel_aus:6.5::server | All versions | 0:1.8.6p3-12.el6_5.2 |
| `sudo-devel` | Red Hat:rhel_aus:6.5::server | All versions | 0:1.8.6p3-12.el6_5.2 |
| `sudo` | Red Hat:rhel_aus:6.6::server | All versions | 0:1.8.6p3-15.el6_6.2 |
| `sudo-debuginfo` | Red Hat:rhel_aus:6.6::server | All versions | 0:1.8.6p3-15.el6_6.2 |
| `sudo-devel` | Red Hat:rhel_aus:6.6::server | All versions | 0:1.8.6p3-15.el6_6.2 |
| `sudo` | Red Hat:rhel_aus:7.2::server | All versions | 0:1.8.6p7-17.el7_2.2 |
| `sudo-debuginfo` | Red Hat:rhel_aus:7.2::server | All versions | 0:1.8.6p7-17.el7_2.2 |
| `sudo-devel` | Red Hat:rhel_aus:7.2::server | All versions | 0:1.8.6p7-17.el7_2.2 |
| `sudo` | Red Hat:rhel_aus:7.3::server | All versions | 0:1.8.6p7-23.el7_3.2 |
| `sudo-debuginfo` | Red Hat:rhel_aus:7.3::server | All versions | 0:1.8.6p7-23.el7_3.2 |
| `sudo-devel` | Red Hat:rhel_aus:7.3::server | All versions | 0:1.8.6p7-23.el7_3.2 |
| `sudo` | Red Hat:rhel_aus:7.4::server | All versions | 0:1.8.19p2-12.el7_4.1 |

Products: Canonical Ubuntu Linux, Debian Debian Linux, Fedoraproject Fedora, Netapp Element Software Management Node, Opensuse Leap, Redhat Enterprise Linux, Redhat Enterprise Linux Desktop, Redhat Enterprise Linux Eus, Redhat Enterprise Linux Server, Redhat Enterprise Linux Server Aus, Redhat Enterprise Linux Server Tus, Redhat Enterprise Linux Workstation, Redhat Openshift Container Platform, Redhat Virtualization, Sudo Project Sudo.

## How do I fix CVE-2019-14287?

Upgrade to a fixed version.

## Is CVE-2019-14287 being exploited?

There is no known exploitation of CVE-2019-14287 in the wild and no public exploit code.

Public exploit code:

- Sudo exploit (github_poc): https://github.com/n0w4n/CVE-2019-14287
- Containerized and deployable use of the CVE-2019-14287 vuln. View README.md for more. (github_poc): https://github.com/CMNatic/Dockerized-CVE-2019-14287
- Sudo Security Bypass (CVE-2019-14287) (github_poc): https://github.com/shallvhack/Sudo-Security-Bypass-CVE-2019-14287
- https://github.com/FauxFaux/sudo-cve-2019-14287 (github_poc): https://github.com/FauxFaux/sudo-cve-2019-14287
- This is a container built for demonstration purposes that has a version of the sudo command which is vulnerable to CVE-2019-14287 (github_poc): https://github.com/CashWilliams/CVE-2019-14287-demo
- https://github.com/MariliaMeira/CVE-2019-14287 (github_poc): https://github.com/MariliaMeira/CVE-2019-14287

## Other vulnerabilities in Canonical Ubuntu Linux

- [CVE-2020-11651](https://insights.sbomify.com/CVE-2020-11651/): SaltStack Salt Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2020-7247](https://insights.sbomify.com/CVE-2020-7247/): OpenSMTPD Remote Code Execution (critical 9.8, exploited in the wild)
- [CVE-2019-16928](https://insights.sbomify.com/CVE-2019-16928/): Exim Out-of-bounds Write (critical 9.8, exploited in the wild)
- [CVE-2018-6789](https://insights.sbomify.com/CVE-2018-6789/): Exim Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2015-2590](https://insights.sbomify.com/CVE-2015-2590/): Oracle Java SE and Java SE Embedded Remote Code Execution (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2019-14287 and fix it if it is affected.

What it is: CVE-2019-14287 is a high-severity vulnerability in Canonical Ubuntu Linux, published on 17 Oct 2019. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2019-14287 in the wild and no public exploit code.

Affected product: Canonical Ubuntu Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2019-14287/ (Markdown: https://insights.sbomify.com/CVE-2019-14287/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2019-14287
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2019-14287
- OSV: https://osv.dev/vulnerability/CVE-2019-14287

---
From sbomify Insights: https://insights.sbomify.com/CVE-2019-14287/
Summaries are generated and may contain mistakes; the official description above is the record.
