RULE(RULE ID:1605080)

Rule General Information
Release Date: 2020-07-14
Rule Name: Microsoft SQL Server sp_replwritetovarbin Buffer Overflow Vulnerability (CVE-2008-5416)
Severity:
CVE ID:
Rule Protection Details
Description: Heap-based buffer overflow in Microsoft SQL Server 2000 SP4, 8.00.2050, 8.00.2039, and earlier; SQL Server 2000 Desktop Engine (MSDE 2000) SP4; SQL Server 2005 SP2 and 9.00.1399.06; SQL Server 2000 Desktop Engine (WMSDE) on Windows Server 2003 SP1 and SP2; and Windows Internal Database (WYukon) SP2 allows remote authenticated users to cause a denial of service (access violation exception) or execute arbitrary code by calling the sp_replwritetovarbin extended stored procedure with a set of invalid parameters that trigger memory overwrite, aka "SQL Server sp_replwritetovarbin Limited Memory Overwrite Vulnerability."
Impact: A buffer overflow vulnerability can be triggered by an attacker in the context of the vulnerable product. Further attacks includes arbitrary code execution and denial of service.
Affected OS: Windows
Reference: MicrosoftSecurityBulletin:961040
SecurityFocusBID:32710
MicrosoftSecurityBulletin:ms09-004
ExploitDB:7501
Solutions
Microsoft has released a patch MS09-004 to eliminate the vulnerability. The patch can be downloaded at:
https://docs.microsoft.com/en-us/security-updates/securitybulletins/2009/ms09-004