CVE-2010-1646: Medium severity Todd Miller Sudo vulnerability

Published May 31, 2010
·
Updated

Anders Kaseorg and Evan Broder reported a flaw in the way sudo handled duplicated environment variables. When sudo set certain environment variables (such as PATH set to securepath value, or special sudo environment variables SUDO), the value overwrote first value from user's environment (if it had been preserved and had not removed previously due to envreset / envkeep / envdelete settings), but left following environment variables with the same name unchanged.

This problem can be used to override securepath setting from /etc/sudoers file for shell scripts executed using sudo, as bash uses last PATH environment variable value. In configurations where securepath is used to enforce sane PATH setting for shell scripts, this can allow users with the privileges to run some script using sudo to run arbitrary command with the privileges of the target user.

Upstream fixes to handle duplicated environment variables: http://www.sudo.ws/repos/sudo/rev/3057fde43cf0 http://www.sudo.ws/repos/sudo/rev/a09c6812eaec

This issue affects sudo packages shipped in Red Hat Enterprise Linux 5, however not the default configuration. In default configuration, no securepath is set. envreset is used by default, and PATH is not preserved during the environment reset (unlike the upstream sudo default).

The sudo packages in Red Hat Enterprise Linux 3 and 4 do not allow setting securepath in the /etc/sudoers, there is no compile-time default for the securepath either. Whether the user PATH setting is preserved depends on envreset / envdelete configuration.

Current Fedora configuration specifies securepath, but also removes PATH from the environment by default.

Other sources

The secure path feature in env.c in sudo 1.3.1 through 1.6.9p22 and 1.7.0 through 1.7.2p6 does not properly handle an environment that contains multiple PATH variables, which might allow local users to gain privileges via a crafted value of the last PATH variable.

MITRE

Affected Software

74 affected components
Todd Miller Sudo=1.6.3p1
Todd Miller Sudo=1.6.9p1
Todd Miller Sudo=1.6.8p1
Todd Miller Sudo=1.6.3p3
Todd Miller Sudo=1.3.1
Todd Miller Sudo=1.7.2p4
Todd Miller Sudo=1.6.6
Todd Miller Sudo=1.6.3p2
Todd Miller Sudo=1.6.9p14
Todd Miller Sudo=1.6.9p17
Todd Miller Sudo=1.7.0
Todd Miller Sudo=1.6.8p5
Todd Miller Sudo=1.6.7p3
Todd Miller Sudo=1.6.8p8
Todd Miller Sudo=1.6.3
Todd Miller Sudo=1.6.8p2
Todd Miller Sudo=1.6.1
Todd Miller Sudo=1.6.9p15
Todd Miller Sudo=1.6.7p1
Todd Miller Sudo=1.6.9p20
Todd Miller Sudo=1.7.1
Todd Miller Sudo=1.7.2p2
Todd Miller Sudo=1.7.2p7
Todd Miller Sudo=1.7.2
Todd Miller Sudo=1.6.8p6
Todd Miller Sudo=1.6.2
Todd Miller Sudo=1.6.9p22
Todd Miller Sudo=1.6.9p6
Todd Miller Sudo=1.6.8
Todd Miller Sudo=1.6.9p7
Todd Miller Sudo=1.6.9p9
Todd Miller Sudo=1.6.9p8
Todd Miller Sudo=1.6.8p10
Todd Miller Sudo=1.6.4p1
Todd Miller Sudo=1.6.8p3
Todd Miller Sudo=1.6.5p2
Todd Miller Sudo=1.6.2p1
Todd Miller Sudo=1.6.9p10
Todd Miller Sudo=1.6.5
Todd Miller Sudo=1.7.2p1
Todd Miller Sudo=1.6.2p2
Todd Miller Sudo=1.6.9
Todd Miller Sudo=1.7.2p3
Todd Miller Sudo=1.6.9p4
Todd Miller Sudo=1.6.7p2
Todd Miller Sudo=1.6.9p19
Todd Miller Sudo=1.6.3p4
Todd Miller Sudo=1.6.3p6
Todd Miller Sudo=1.6.3p7
Todd Miller Sudo=1.6.9p18
Todd Miller Sudo=1.6.9p12
Todd Miller Sudo=1.6.7p4
Todd Miller Sudo=1.6.7p5
Todd Miller Sudo=1.6.9p13
Todd Miller Sudo=1.6
Todd Miller Sudo=1.6.4
Todd Miller Sudo=1.6.8p7
Todd Miller Sudo=1.6.8p11
Todd Miller Sudo=1.6.9p3
Todd Miller Sudo=1.6.9p21
Todd Miller Sudo=1.6.7
Todd Miller Sudo=1.6.8p9
Todd Miller Sudo=1.6.3p5
Todd Miller Sudo=1.6.9p5
Todd Miller Sudo=1.6.9p2
Todd Miller Sudo=1.7.2p5
Todd Miller Sudo=1.6.8p12
Todd Miller Sudo=1.6.4p2
Todd Miller Sudo=1.6.5p1
Todd Miller Sudo=1.6.9p16
Todd Miller Sudo=1.6.8p4
Todd Miller Sudo=1.7.2p6
Todd Miller Sudo=1.6.9p11
Todd Miller Sudo=1.6.2p3

Event History

May 31, 2010
Data Sourced
via Red Hat·03:19 PM
DescriptionSeverityAffected Software
Jun 7, 2010
CVE Published
via MITRE·02:00 PM
Data Sourced
via MITRE·02:00 PM
Description
Data Sourced
via NVD·05:12 PM
RemedyDescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2010-1646?

CVE-2010-1646 has a moderate severity rating, as it can lead to unintended command behavior due to the mishandling of environment variables.

2

How do I fix CVE-2010-1646?

To fix CVE-2010-1646, upgrade to a patched version of sudo that addresses the issue, such as versions later than 1.6.9p22.

3

What software is affected by CVE-2010-1646?

CVE-2010-1646 affects various versions of sudo, including 1.3.1 through multiple 1.6.x versions.

4

What kind of vulnerability is CVE-2010-1646?

CVE-2010-1646 is an environment variable handling flaw that potentially allows overwriting of important environment variables.

5

Can CVE-2010-1646 be exploited remotely?

CVE-2010-1646 is not a remote vulnerability and requires local access to exploit.

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