CVE-2008-5416: Microsoft SQL Server - Buffer Overflow
- Cve: CVE-2008-5416
- Name: Microsoft SQL Server - Buffer Overflow
- 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: Attackers can cause denial of service or execute arbitrary code remotely by exploiting this heap overflow.
- Remediation: Update to the latest service pack or version that addresses this vulnerability.
- Vulnerability type: buffer_overflow
- Vulnerability impact: denial_of_service, remote_code_execution
- Requirement type: logged_in
- Requirements: Attacker needs to be authenticated and call sp_replwritetovarbin with crafted parameters.
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9
- Cvss vector: CVSS:2.0/AV:N/AC:L/Au:S/C:C/I:C/A:C
- Epss score: 0.87036
- Epss percentile: 0.99753
- Assignee: [email protected]
- Published at: 2008-12-10T14:00:01Z
- Age in days: 6558
- Modified at: 2026-06-16T22:59:56Z
- Public exploits total: 5
- References total: 22
- Products total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2008-5416
- Nvd status: modified
- Checked, none or zero: patch available, known exploited entries, nuclei templates, public exploits capped, oss, projects total, projects, rejected by nvd
- Not known: hackerone
Cwe
| Id | Name |
|---|---|
| CWE-119 | Improper Restriction of Operations within the Bounds of a Memory Buffer |
Public exploits
| Url | Source | Added date |
|---|---|---|
| http://www.sec-consult.com/files/20081209_mssql-2000-sp_replwritetovarbin_memwrite.txt | nvd | 2008-12-10 |
| http://www.securityfocus.com/bid/32710 | nvd | 2008-12-10 |
| https://github.com/SECFORCE/CVE-2008-5416 | poc-in-github | 2017-05-03 |
| https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb | metasploit | 2008-12-09 |
| https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin_sqli.rb | metasploit | 2008-12-09 |
References
Same in every row:
- Source: nvd
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| microsoft:sql_server | = 2005, = 2000 | no | nvd | /v1/products/microsoft/sql_server |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Exploitation seen: yes
- Public exploit: yes
- Public exploit count: 5
- Public exploit first date: 2008-12-09
- Remote: yes
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, initial access
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts