CVE-2016-7076: Command Injection

Published Oct 14, 2016
·
Updated

Last updated 25 August 2025

Other sources

sudo before version 1.8.18p1 is vulnerable to a bypass in the sudo noexec restriction if application run via sudo executed wordexp() C library function with a user supplied argument. A local user permitted to run such application via sudo with noexec restriction could possibly use this flaw to execute arbitrary commands with elevated privileges.

— Launchpad

The sudo allows the use of NOEXEC tag it its configuration to define that program executed via sudo can not execute any other commands. This restriction is implemented via dynamic library which is preloaded for the executed program and which implements wrappers for various exec functions.

It was discovered that the wrapping of exec functions is insufficient to block command execution via glibc APIs that internally call one of the exec functions - system() or popen() (see CVE-2016-7032 tracked via bug 1372830), and wordexp (CVE-2016-7076, tracked via this bug).

This issue was originally tracked under single CVE via bug 1372830, but the CVE assignment was split because of different versions in which problems for system()/popen() and wordexp() were fixed.

The noexec bypass using wordexp() is being fixed in 1.8.18p1 (see bug 1372830 comment 11):

Wrapper for wordexp() was added to sudonoexec.so which forces the use of WRDENOCMD flag in wordexp().

https://www.sudo.ws/repos/sudo/rev/e7d09243e51b https://www.sudo.ws/repos/sudo/rev/7b8357b0a358 https://www.sudo.ws/repos/sudo/rev/167a518d8129

NEWS file entry:

When sudonoexec.so is used, the WRDENOCMD flag is now added if the wordexp() function is called. This prevents commands from being run via wordexp() without disabling it entirely.

— Red Hat

Affected Software

3 affected componentsFixes available
Sudo Project Sudo>=1.6.8<=1.8.18
debian/sudo
1.9.5p2-3+deb11u11.9.5p2-3+deb11u31.9.13p3-1+deb12u31.9.13p3-1+deb12u21.9.16p2-3+deb13u11.9.17p2-4
redhat/sudo<1.8.18
1.8.18

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/sudo to a version that resolves this vulnerability.

    Fixed in 1.9.5p2-3+deb11u1Fixed in 1.9.5p2-3+deb11u3Fixed in 1.9.13p3-1+deb12u3Fixed in 1.9.13p3-1+deb12u2Fixed in 1.9.16p2-3+deb13u1Fixed in 1.9.17p2-4
  2. Upgrade

    Upgrade redhat/sudo to a version that resolves this vulnerability.

    Fixed in 1.8.18
  3. Upgrade

    Upgrade sudo to a version that resolves this vulnerability.

    Fixed in 1.8.18p1

Event History

Oct 14, 2016
Data Sourced
via Red Hat·01:41 PM
DescriptionSeverityAffected Software
May 29, 2018
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
RemedyDescriptionAffected Software
Updated
via Ubuntu·12:00 AM
Description
CVE Published
via MITRE·01:00 PM
Data Sourced
via MITRE·01:00 PM
DescriptionSeverityWeakness
Sep 30, 2020
Data Sourced
06:15 PM
Weakness
Nov 7, 2023
Data Sourced
via NVD·02:34 AM
DescriptionSeverityWeaknessAffected Software
Updated
02:34 AM
SeverityAffected Software
Updated
via NVD·02:34 AM
Affected Software
Nov 21, 2024
Updated
via NVD·02:57 AM
Affected Software
Jun 17, 2026
Updated
via NVD·12:52 AM
Affected Software

Frequently Asked Questions

1

What is the vulnerability ID for this vulnerability?

The vulnerability ID for this vulnerability is CVE-2016-7076.

2

What is the severity rating of CVE-2016-7076?

CVE-2016-7076 has a severity rating of 7.8 (high).

3

What is the affected software for CVE-2016-7076?

The affected software for CVE-2016-7076 includes sudo versions before 1.8.18p1.

4

How can this vulnerability be exploited?

This vulnerability can be exploited by a local user who is permitted to run an application via sudo with the noexec restriction.

5

Are there any known fixes for this vulnerability?

Yes, there are known fixes for this vulnerability. Please refer to the references for more information.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203