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."
CVE-2008-5416
Score elevated to 9.0 because EPSS predicts 88% probability of exploitation within the next 30 days (top 0.5% of all CVEs). Confidence: see factors.
- High exploitation likelihood — EPSS 87%
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- —
- EG Score
- 9.0(low)
- EPSS
- 99.7%
- KEV
- Not listed
Published
December 10, 2008
Last Modified
April 23, 2026
References (44)
- cve@mitrehttp://archives.neohapsis.com/archives/fulldisclosure/2008-12/0304.html
- cve@mitrehttp://osvdb.org/50917
- cve@mitrehttp://secunia.com/advisories/33034
- cve@mitrehttp://securityreason.com/securityalert/4706
- cve@mitrehttp://securitytracker.com/id?1021363
- cve@mitrehttp://securitytracker.com/id?1021490
- cve@mitrehttp://support.avaya.com/elmodocs2/security/ASA-2009-055.htm
- cve@mitrehttp://www.kb.cert.org/vuls/id/696644
- cve@mitrehttp://www.microsoft.com/technet/security/advisory/961040.mspx
- cve@mitrehttp://www.sec-consult.com/files/20081209_mssql-2000-sp_replwritetovarbin_memwrite.txt
- cve@mitrehttp://www.securityfocus.com/archive/1/499042/100/0/threaded
- cve@mitrehttp://www.securityfocus.com/archive/1/499085/100/0/threaded
- cve@mitrehttp://www.securityfocus.com/archive/1/516397/100/0/threaded
- cve@mitrehttp://www.securityfocus.com/bid/32710
- cve@mitrehttp://www.us-cert.gov/cas/techalerts/TA09-041A.html
Weakness Classification(1)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 5× in last 7d / 18× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-06 16:23 UTCEPSS rescore
- 2026-07-05 02:26 UTCEPSS rescore
- 2026-07-05 02:26 UTCEPSS rescore
- 2026-07-01 15:02 UTCEPSS rescore
- 2026-07-01 15:02 UTCEPSS rescore
- 2026-06-27 03:04 UTCEPSS rescore
- 2026-06-23 21:29 UTCEPSS rescore
- 2026-06-23 21:29 UTCEPSS rescore
- 2026-06-17 17:49 UTCEPSS rescore
- 2026-06-17 17:49 UTCEPSS rescore
- 2026-06-15 17:44 UTCEPSS rescore
- 2026-06-14 23:13 UTCEPSS rescore
- 2026-06-13 22:57 UTCEPSS rescore
- 2026-06-12 23:08 UTCEPSS rescore
- 2026-06-12 23:08 UTCEPSS rescore
- 2026-06-10 22:14 UTCEPSS rescore
- 2026-06-10 13:17 UTCEPSS rescore
- 2026-06-08 14:13 UTCEPSS rescore
- 2026-06-07 15:22 UTCEPSS rescore
- 2026-06-05 22:44 UTCEPSS rescore
- 2026-06-05 22:44 UTCEPSS rescore
- 2026-06-05 06:07 UTCEPSS rescore
- 2026-06-04 13:09 UTCEPSS rescore
- 2026-06-04 13:09 UTCEPSS rescore
- 2026-06-01 13:49 UTCEPSS rescore
Show 16 moreShow fewer
- 2026-06-01 13:49 UTCEPSS rescore
- 2026-06-01 13:49 UTCEPSS rescore
- 2026-05-30 19:11 UTCEG score recompute
- 2026-05-30 19:11 UTCGHSA enrichment
- 2026-05-29 13:40 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-28 13:42 UTCEPSS rescore
- 2026-05-26 07:16 UTCEPSS rescore
- 2026-05-26 07:16 UTCEPSS rescore
- 2026-05-24 16:43 UTCEPSS rescore
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-22 21:15 UTCEPSS rescore
- 2026-05-20 22:37 UTCEPSS rescore
- 2026-05-20 22:36 UTCEPSS rescore
- 2026-05-18 21:29 UTCEPSS rescore
Publicly available exploits
(6 references)Working exploit code is in the public domain (2 Metasploit modules) (1 GitHub PoC) (3 Exploit-DB entries). Defenders should treat patch urgency accordingly — public PoCs typically lead to mass-exploitation within 24-72 hours.
- GitHub PoCSECFORCE/CVE-2008-5416First seen May 3, 2017
Microsoft SQL Server sp_replwritetovarbin Memory Corruption via SQL Injection
Open source ↗ - Exploit-DBEDB-16396✓ verifiedFirst seen Feb 8, 2011
Microsoft SQL Server - sp_replwritetovarbin Memory Corruption (MS09-004) (via SQL Injection) (Metasploit)
Open source ↗ - Exploit-DBEDB-16392✓ verifiedFirst seen Jan 24, 2011
Microsoft SQL Server - sp_replwritetovarbin Memory Corruption (MS09-004) (Metasploit)
Open source ↗ - Exploit-DBEDB-7501✓ verifiedFirst seen Dec 17, 2008
Microsoft SQL Server - 'sp_replwritetovarbin()' Heap Overflow
Open source ↗ - Metasploitexploit/windows/mssql/ms09_004_sp_replwritetovarbin✓ verifiedFirst seen Dec 9, 2008
MS09-004 Microsoft SQL Server sp_replwritetovarbin Memory Corruption
Open source ↗ - Metasploitexploit/windows/mssql/ms09_004_sp_replwritetovarbin_sqli✓ verifiedFirst seen Dec 9, 2008
MS09-004 Microsoft SQL Server sp_replwritetovarbin Memory Corruption via SQL Injection
Open source ↗
Related CVEs(same CWE)
Same CWE
10 shownCWE-119
Frequently asked(4)
What is CVE-2008-5416?
When was CVE-2008-5416 disclosed?
Is CVE-2008-5416 actively exploited?
How do I remediate CVE-2008-5416?
Dependency Blast Radius
Explore the affected products and dependency analysis for CVE-2008-5416
Is Your Infrastructure Affected by CVE-2008-5416?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.