The Microsoft SQL Server contains a buffer overflow vulnerability that may allow remote attackers to execute arbitrary code with system privileges.
The Microsoft SQL Server provides multiple methods for users to authenticate to SQL databases. When SQL Server Authentication is used, the username and password of each database user is stored in a database on the SQL server. When users supply a password to the server using this method, a function named pwdencrypt() is responsible for encrypting the user-supplied password so that it can be compared to the encrypted password stored on the SQL server. There is a buffer overflow in pwdencrypt() that allows remote attackers to execute arbitrary code on the SQL server by supplying a crafted password value. Successful exploitation of this vulnerability requires knowledge of a valid username and will cause the supplied code to execute with the privileges of the SQL service account.
This vulnerability allows remote attackers with knowledge of a valid username to execute arbitrary code with the privileges of the SQL service account. If the privileges of the service account are elevated via VU#796313, this vulnerability may result in compromise of the server host.
Apply a patch
Microsoft has published Security Bulletin MS02-034 to address this vulnerability. For more information, please see
This vulnerability was reported by Martin Rakhmanoff to the Bugtraq mailing list on June 14, 2002.