Microsoft SQL Server spreplwritetovarbin Buffer Overflow

Added: 04/29/2009
CVE: CVE-2008-5416
BID: 32710
OSVDB: 50917


Microsoft SQL Server is a database server package for Windows platforms.


A buffer overflow vulnerability in the spreplwritetovarbin stored procedure allows remote, authenticated attackers to execute arbitrary commands by specifying invalid parameters.


Apply the appropriate update referenced in the Microsoft MS09-004 Security Bulletin.



Exploit works against SQL Server 2000 SP4, SQL Server 2005 SP0/SP1/SP2.
Exploit works on Windows 2000 SP4 or Windows 2003 SP0/SP0/SP2 with DEP enabled or disabled.

Exploit requires the login and password of a database user.
Alternativly the exploit procedure can be accessed through a SQL injection vulnerability.

Exploit requires the sqsh utility, which can be downloaded from or through a distribution repository.


Windows Server 2003 SP2 / Windows Server 2003
Windows Server 2003 SP1
Windows Server 2003 SP0
Windows 2000

Back to exploit index