[UNIX] ChangePassword Unsafe Command Execution (make)
From: SecuriTeam (support_at_securiteam.com)
To: email@example.com Date: 22 Dec 2004 14:07:36 +0200
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
- - - - - - - - -
ChangePassword Unsafe Command Execution (make)
" <http://changepassword.sourceforge.net/> ChangePassword modifies the
passwords of passwd, Samba, and Squid through the Web. All passwords are
synchronized and changed in real time through browsers like Mozilla,
Netscape, IE, Opera, and others."
If changepassword.cgi is installed on a multiuser computer, any user with
an account on the computer can seize control of the computer.
* ChangePassword version 0.8 and prior
A malicious user can read and modify every user's files, watch all
programs running, etc.
(The attack doesn't work on Linux systems where /bin/sh drops setuid, but
changepassword.cgi itself doesn't work on those systems).
Here's the bug: Line 317 of changepassword.c, without cleaning its
environment in any way, calls:
system("cd /var/yp && make &> /dev/null");
The Makefile sets changepassword.cgi to be setuid root (mode 4755). A user
can set $PATH to point to his own make program, set $CONTENT_LENGTH to
512, set $REQUEST_METHOD to POST, and call the script with the following
Where 'u' is his username and 'p' is his password. The user's program
named 'make' then runs with root privileges.
The information has been provided by <mailto:firstname.lastname@example.org> Anand
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: email@example.com
In order to subscribe to the mailing list, simply forward this email to: firstname.lastname@example.org
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.