Vulnerability Note VU#846832

glibc unsetenv fails to properly handle environment variables passed more than once to a program

Original Release date: 17 May 2001 | Last revised: 13 Sep 2002


The glibc implementation of unsetenv() fails to properly remove one of two successive occurrences of the same environment variable if the variable is redundently passed to a program.


The glibc implementation of unsetenv(), if called to remove an environment variable that occurs two times in succession on the environment variable list, will fail to remove one of the occurences due to an off-by-one error in the implementation.


An attacker can pass multiple occurrences of a sensitive environment variable (such as LD_LIBRARY_PATH, LD_PRELOAD, etc.) to a setuid root program. Even if glibc forces that program to ignore these variables, they may be passed along to a program called from the setuid root program. Using this indirect execution, an attacker might cause malicious code to be executed as root.


Apply vendor patches; see the Systems Affected section below.

Systems Affected (Learn More)

VendorStatusDate NotifiedDate Updated
ConectivaAffected31 Aug 200016 May 2001
DebianAffected31 Aug 200013 Sep 2002
MandrakeSoftAffected29 Aug 200016 May 2001
TurboLinuxAffected31 Aug 200016 May 2001
If you are a vendor and your product is affected, let us know.

CVSS Metrics (Learn More)

Group Score Vector
Base N/A N/A
Temporal N/A N/A
Environmental N/A N/A



The original report of this vulnerability was by Tymm Twillman .

This document was last modified by Tim Shimeall.

Other Information

  • CVE IDs: CVE-2000-0824
  • Date Public: 17 Sep 99
  • Date First Published: 17 May 2001
  • Date Last Updated: 13 Sep 2002
  • Severity Metric: 7.09
  • Document Revision: 9


If you have feedback, comments, or additional information about this vulnerability, please send us email.