{"id":"CVE-2008-5416","published":"2008-12-10T13:33:00Z","modified":"2024-08-07T10:56:45Z","title":"Heap-based buffer overflow in Microsoft SQL Server 2000 SP4, 8.00.2050, 8.00.2039, and earlier; SQL Server 2000…","vendor":null,"product":null,"tier":"core","eol":null,"description":{"text":"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.\"","provenance":"source","from":"CVE.org"},"summary":{"text":"A heap-based buffer overflow exists in Microsoft SQL Server 2000 (SP4 and earlier builds such as 8.00.2050 and 8.00.2039), its Desktop Engine (MSDE 2000) and WMSDE variants, SQL Server 2005 SP2 and 9.00.1399.06, and Windows Internal Database (WYukon) SP2, in the sp_replwritetovarbin extended stored procedure. A remote attacker who has valid authentication to the server can call that procedure with a crafted set of invalid parameters to overwrite memory, causing either a denial of service through an access violation or arbitrary code execution.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:16:36Z"},"cvss":null,"epss":{"score":0.87036,"percentile":0.99747,"date":"2026-10-28","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":1,"pulses":[{"name":"CVE -CVE Reference Map for Source MS - Curios RE active candidates CVE version 20061101","url":"https://otx.alienvault.com/pulse/679c3446de4f362fac9217f9","created":"2025-01-31"}],"provenance":"machine"},"cwes":[],"references":[{"url":"http://www.sec-consult.com/files/20081209_mssql-2000-sp_replwritetovarbin_memwrite.txt","tags":["x_refsource_MISC"]},{"url":"http://www.vupen.com/english/advisories/2008/3380","tags":["vdb-entry","x_refsource_VUPEN"]},{"url":"http://secunia.com/advisories/33034","tags":["third-party-advisory","x_refsource_SECUNIA"]},{"url":"http://osvdb.org/50917","tags":["vdb-entry","x_refsource_OSVDB"]},{"url":"http://securitytracker.com/id?1021363","tags":["vdb-entry","x_refsource_SECTRACK"]},{"url":"https://www.exploit-db.com/exploits/7501","tags":["exploit","x_refsource_EXPLOIT-DB"]},{"url":"http://securitytracker.com/id?1021490","tags":["vdb-entry","x_refsource_SECTRACK"]},{"url":"https://exchange.xforce.ibmcloud.com/vulnerabilities/47182","tags":["vdb-entry","x_refsource_XF"]},{"url":"http://www.kb.cert.org/vuls/id/696644","tags":["third-party-advisory","x_refsource_CERT-VN"]},{"url":"http://www.securityfocus.com/archive/1/499042/100/0/threaded","tags":["mailing-list","x_refsource_BUGTRAQ"]},{"url":"http://www.securityfocus.com/archive/1/499085/100/0/threaded","tags":["mailing-list","x_refsource_BUGTRAQ"]},{"url":"https://docs.microsoft.com/en-us/security-updates/securitybulletins/2009/ms09-004","tags":["vendor-advisory","x_refsource_MS"]},{"url":"http://securityreason.com/securityalert/4706","tags":["third-party-advisory","x_refsource_SREASON"]},{"url":"http://www.vmware.com/support/vsphere4/doc/vsp_vc41_u1_rel_notes.html","tags":["x_refsource_CONFIRM"]},{"url":"http://www.microsoft.com/technet/security/advisory/961040.mspx","tags":["x_refsource_CONFIRM"]},{"url":"http://www.securityfocus.com/bid/32710","tags":["vdb-entry","x_refsource_BID"]},{"url":"https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A6217","tags":["vdb-entry","signature","x_refsource_OVAL"]},{"url":"http://www.vmware.com/security/advisories/VMSA-2011-0003.html","tags":["x_refsource_CONFIRM"]},{"url":"http://www.us-cert.gov/cas/techalerts/TA09-041A.html","tags":["third-party-advisory","x_refsource_CERT"]},{"url":"http://archives.neohapsis.com/archives/fulldisclosure/2008-12/0304.html","tags":["mailing-list","x_refsource_FULLDISC"]},{"url":"http://www.securityfocus.com/archive/1/516397/100/0/threaded","tags":["mailing-list","x_refsource_BUGTRAQ"]},{"url":"http://support.avaya.com/elmodocs2/security/ASA-2009-055.htm","tags":["x_refsource_CONFIRM"]}],"techniques":[],"reports":[],"affected":[],"advisories":[],"euvd":{"id":"EUVD-2008-5393","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2008-5393","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[{"id":7501,"url":"https://www.exploit-db.com/exploits/7501","title":"Microsoft SQL Server - 'sp_replwritetovarbin()' Heap Overflow","type":"local","platform":"windows","date":"2008-12-17","verified":true,"provenance":"source"},{"id":16392,"url":"https://www.exploit-db.com/exploits/16392","title":"Microsoft SQL Server - sp_replwritetovarbin Memory Corruption (MS09-004) (Metasploit)","type":"remote","platform":"windows","date":"2011-01-24","verified":true,"provenance":"source"},{"id":16396,"url":"https://www.exploit-db.com/exploits/16396","title":"Microsoft SQL Server - sp_replwritetovarbin Memory Corruption (MS09-004) (via SQL Injection) (Metasploit)","type":"remote","platform":"windows","date":"2011-02-08","verified":true,"provenance":"source"}],"exploitSources":{"exploitdb":{"count":3,"earliest":"2008-12-17"},"pocGithub":{"count":1,"skipped":0,"earliest":"2017-05-03","earliestUrl":"https://github.com/SECFORCE/CVE-2008-5416","repos":[{"name":"SECFORCE/CVE-2008-5416","url":"https://github.com/SECFORCE/CVE-2008-5416","stars":3,"created":"2017-05-03"}]},"metasploit":[{"name":"MS09-004 Microsoft SQL Server sp_replwritetovarbin Memory Corruption","module":"exploit/windows/mssql/ms09_004_sp_replwritetovarbin","type":"exploit","disclosureDate":"2008-12-09","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb"},{"name":"MS09-004 Microsoft SQL Server sp_replwritetovarbin Memory Corruption via SQL Injection","module":"exploit/windows/mssql/ms09_004_sp_replwritetovarbin_sqli","type":"exploit","disclosureDate":"2008-12-09","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin_sqli.rb"}],"first":{"date":"2008-12-09","source":"Metasploit","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb"},"provenance":"source"},"exploitRefs":["https://www.exploit-db.com/exploits/7501"],"flow":[],"timeline":[{"date":"2008-12-09","kind":"exploit-public","label":"First public exploit: Metasploit; later: Exploit-DB 2008-12-17, PoC-in-GitHub 2017-05-03","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb","provenance":"source"},{"date":"2008-12-10","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2008-5416","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":"Metasploit","daysToKev":null},"priority":{"score":25.6,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.95,"detail":"percentile 0.9975"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 NVD reference tagged Exploit; 3 Exploit-DB entries; 1 PoC-in-GitHub repo; 2 Metasploit modules"},{"name":"Mentioned in OTX pulses","points":0.68,"detail":"1 pulse"},{"name":"CVSS severity","points":0.0,"detail":"no CVSS"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}