# CVE-2017-1000368: Command injection in n/a

> Attackers can exploit input validation flaws in sudo to execute arbitrary commands and disclose sensitive information.

- **Severity:** High 8.2 (`CVSS:3.0/AV:L/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 5 Jun 2017
- **Updated:** 5 Aug 2024
- **Also known as:** ALPINE-CVE-2017-1000368, DEBIAN-CVE-2017-1000368, DLA-1011-1, GHSA-v7hw-ff58-vxfm, RHSA-2017:1574, SUSE-SU-2017:1626-1, SUSE-SU-2017:1627-1, SUSE-SU-2017:1771-1, SUSE-SU-2017:1778-1, UBUNTU-CVE-2017-1000368, USN-3968-2

## What is CVE-2017-1000368?

CVE-2017-1000368 is a high-severity command injection vulnerability in n/a, published on 5 Jun 2017. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Todd Miller's sudo version 1.8.20p1 and earlier is vulnerable to an input validation (embedded newlines) in the get_process_ttyname() function resulting in information disclosure and command execution.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2017-1000368?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `sudo` | Red Hat:enterprise_linux:6::client | All versions | 0:1.8.6p3-29.el6_9 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:6::client | All versions | 0:1.8.6p3-29.el6_9 |
| `sudo-devel` | Red Hat:enterprise_linux:6::client | All versions | 0:1.8.6p3-29.el6_9 |
| `sudo` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.8.6p3-29.el6_9 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.8.6p3-29.el6_9 |
| `sudo-devel` | Red Hat:enterprise_linux:6::computenode | All versions | 0:1.8.6p3-29.el6_9 |
| `sudo` | Red Hat:enterprise_linux:6::server | All versions | 0:1.8.6p3-29.el6_9 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:6::server | All versions | 0:1.8.6p3-29.el6_9 |
| `sudo-devel` | Red Hat:enterprise_linux:6::server | All versions | 0:1.8.6p3-29.el6_9 |
| `sudo` | Red Hat:enterprise_linux:6::workstation | All versions | 0:1.8.6p3-29.el6_9 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:6::workstation | All versions | 0:1.8.6p3-29.el6_9 |
| `sudo-devel` | Red Hat:enterprise_linux:6::workstation | All versions | 0:1.8.6p3-29.el6_9 |
| `sudo` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.6p7-23.el7_3 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.6p7-23.el7_3 |
| `sudo-devel` | Red Hat:enterprise_linux:7::client | All versions | 0:1.8.6p7-23.el7_3 |
| `sudo` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.8.6p7-23.el7_3 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.8.6p7-23.el7_3 |
| `sudo-devel` | Red Hat:enterprise_linux:7::computenode | All versions | 0:1.8.6p7-23.el7_3 |
| `sudo` | Red Hat:enterprise_linux:7::server | All versions | 0:1.8.6p7-23.el7_3 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:7::server | All versions | 0:1.8.6p7-23.el7_3 |
| `sudo-devel` | Red Hat:enterprise_linux:7::server | All versions | 0:1.8.6p7-23.el7_3 |
| `sudo` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.8.6p7-23.el7_3 |
| `sudo-debuginfo` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.8.6p7-23.el7_3 |
| `sudo-devel` | Red Hat:enterprise_linux:7::workstation | All versions | 0:1.8.6p7-23.el7_3 |
| `sudo` | Red Hat:rhel_els:5 | All versions | 0:1.7.2p1-31.el5_11 |
| `sudo-debuginfo` | Red Hat:rhel_els:5 | All versions | 0:1.7.2p1-31.el5_11 |
| `sudo` | SUSE:Linux Enterprise Desktop 12 SP2 | All versions | 1.8.10p3-10.10.2 |
| `sudo` | SUSE:Linux Enterprise Desktop 12 SP2 | All versions | 1.8.10p3-10.13.1 |
| `sudo` | SUSE:Linux Enterprise Server 12 SP1-LTSS | All versions | 1.8.10p3-2.16.1 |
| `sudo` | SUSE:Linux Enterprise Server 12 SP1-LTSS | All versions | 1.8.10p3-2.19.1 |
| `sudo` | SUSE:Linux Enterprise Server 12 SP2 | All versions | 1.8.10p3-10.10.2 |
| `sudo` | SUSE:Linux Enterprise Server 12 SP2 | All versions | 1.8.10p3-10.13.1 |
| `sudo` | SUSE:Linux Enterprise Server 12-LTSS | All versions | 1.8.10p3-2.16.1 |
| `sudo` | SUSE:Linux Enterprise Server 12-LTSS | All versions | 1.8.10p3-2.19.1 |
| `sudo` | SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | All versions | 1.8.10p3-10.10.2 |
| `sudo` | SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | All versions | 1.8.10p3-10.13.1 |
| `sudo` | SUSE:Linux Enterprise Server for SAP Applications 12 | All versions | 1.8.10p3-2.16.1 |
| `sudo` | SUSE:Linux Enterprise Server for SAP Applications 12 | All versions | 1.8.10p3-2.19.1 |
| `sudo` | SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | All versions | 1.8.10p3-2.16.1 |
| `sudo` | SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | All versions | 1.8.10p3-2.19.1 |

Products: Sudo Project Sudo.

## How do I fix CVE-2017-1000368?

Apply the vendor's patch.

## Is CVE-2017-1000368 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2015-5602](https://insights.sbomify.com/CVE-2015-5602/): Privilege escalation in n/a (high 7.2)
- [CVE-2022-43995](https://insights.sbomify.com/CVE-2022-43995/): Memory corruption in n/a (high 7.1)
- [CVE-2023-42465](https://insights.sbomify.com/CVE-2023-42465/): Privilege escalation in n/a (high 7.0)
- [CVE-2019-18684](https://insights.sbomify.com/CVE-2019-18684/): Race condition in n/a (high 7.0)
- [CVE-2015-8239](https://insights.sbomify.com/CVE-2015-8239/): Race condition in n/a (high 7.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2017-1000368 and fix it if it is affected.

What it is: CVE-2017-1000368 is a high-severity command injection vulnerability in n/a, published on 5 Jun 2017. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2017-1000368 in the wild and no public exploit code.

Affected product: n/a. 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-2017-1000368/ (Markdown: https://insights.sbomify.com/CVE-2017-1000368/index.md)
```

## Sources

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

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