nday
CVE-2008-5416

SQL Server: buffer overflow / out-of-bounds writeTitle composed by nday; the CVE record has none.

A public PoC appeared 7 days after disclosure. nday has no fix record for it yet; that does not mean no patch exists. Listed by 2 of 4 PoC sources: exploitdb and metasploit. Not in CISA KEV.

tags weakness typebuffer overflow / out-of-bounds write accessnetwork exploitationMetasploitExploit-DB productSQL Server product typedatabase
why these tags

nday derives these tags by fixed rules from the facts below; NVD, the CNA and other sources do not assign them. Vocabulary and rules: ~/tags.

network
AV:N in AV:N/AC:L/Au:S/C:C/I:C/A:C (CVSS 2.0) from NVD's analysts
Metasploit
Metasploit modules exploit/windows/mssql/ms09_004_sp_replwritetovarbin, exploit/windows/mssql/ms09_004_sp_replwritetovarbin_sqli
Exploit-DB
Exploit-DB entries 16392, 16396, 7501
SQL Server
CPE names NVD's analysts give as vulnerable: a:microsoft:sql_server
database
CPE names NVD's analysts give as vulnerable: a:microsoft:sql_serverthe product type of SQL Server in nday's product registry

CVSS 2.0 has no user-interaction metric, so “no user interaction” and “remote, unauthenticated” are never assigned from a CVSS 2.0 vector.

stage
POC
disclosed
disclosure → PoC
T+7d POC is date-only
cvss
no score yet

Lifecycle

x axis UTC; dot = exact minute, wide bar = date only, hollow = unknown or inferred.
time unknown
DISdisclosed
2008-12-10T13:33Z
PATpatch
no record yet
ANAanalysis
no record yet
POCPoC
2008-12-17, date only +2 more
metasploit
ITWexploited
no record yet
KEVKEV
no record yet

Summary

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."

Original text of the CVE record (cvelist), shown as published.

Event log

+DISdisclosed

CVE record published by mitre.

src cvelist · nday , bulk import · raw
{
  "id": 107420,
  "type": "disclosed",
  "source": "cvelist",
  "url": "https://www.cve.org/CVERecord?id=CVE-2008-5416",
  "occurred_at": "2008-12-10T13:33:00Z",
  "observed_at": "2026-11-13T05:35:56.686477Z",
  "is_backfill": true,
  "dedupe_key": "",
  "detail": {
    "state": "PUBLISHED",
    "date_published": "2008-12-10T13:33:00.000Z",
    "assigner_short_name": "mitre"
  }
}
2008-12-17date only, from source
+POCpublic PoC

Exploit-DB lists public exploit code “Microsoft SQL Server - 'sp_replwritetovarbin()' Heap Overflow” (EDB-7501). Verified by Exploit-DB.

src exploitdb 7501 · nday , bulk import · raw
{
  "id": 45682,
  "type": "poc_published",
  "source": "exploitdb",
  "url": "https://www.exploit-db.com/exploits/7501",
  "occurred_at": "2008-12-17T00:00:00Z",
  "observed_at": "2026-11-12T15:24:40.221206Z",
  "is_backfill": true,
  "dedupe_key": "7501",
  "detail": {
    "url": "https://www.exploit-db.com/exploits/7501",
    "file": "exploits/windows/local/7501.asp",
    "kind": "exploit",
    "tags": [],
    "type": "local",
    "title": "Microsoft SQL Server - 'sp_replwritetovarbin()' Heap Overflow",
    "author": "Guido Landi",
    "edb_id": 7501,
    "cve_ids": [
      "CVE-2008-5416",
      "CVE-2008-4270"
    ],
    "platform": "windows",
    "verified": true,
    "precision": "day",
    "confidence": "curated",
    "date_added": "2008-12-16",
    "date_updated": null,
    "date_published": "2008-12-17"
  }
}
2011-01-24date only, from source
+POCpublic PoC

Exploit-DB lists public exploit code “Microsoft SQL Server - sp_replwritetovarbin Memory Corruption (MS09-004) (Metasploit)” (EDB-16392). Verified by Exploit-DB.

src exploitdb 16392 · nday , bulk import · raw
{
  "id": 47951,
  "type": "poc_published",
  "source": "exploitdb",
  "url": "https://www.exploit-db.com/exploits/16392",
  "occurred_at": "2011-01-24T00:00:00Z",
  "observed_at": "2026-11-12T15:24:40.221206Z",
  "is_backfill": true,
  "dedupe_key": "16392",
  "detail": {
    "url": "https://www.exploit-db.com/exploits/16392",
    "file": "exploits/windows/remote/16392.rb",
    "kind": "exploit",
    "tags": [
      "Metasploit Framework (MSF)"
    ],
    "type": "remote",
    "title": "Microsoft SQL Server - sp_replwritetovarbin Memory Corruption (MS09-004) (Metasploit)",
    "author": "Metasploit",
    "edb_id": 16392,
    "cve_ids": [
      "CVE-2008-5416"
    ],
    "platform": "windows",
    "verified": true,
    "precision": "day",
    "confidence": "curated",
    "date_added": "2011-01-24",
    "date_updated": "2011-03-09",
    "date_published": "2011-01-24"
  }
}
2011-02-08date only, from source
+POCpublic PoC

Exploit-DB lists public exploit code “Microsoft SQL Server - sp_replwritetovarbin Memory Corruption (MS09-004) (via SQL Injection) (Metasploit)” (EDB-16396). Verified by Exploit-DB.

src exploitdb 16396 · nday , bulk import · raw
{
  "id": 47952,
  "type": "poc_published",
  "source": "exploitdb",
  "url": "https://www.exploit-db.com/exploits/16396",
  "occurred_at": "2011-02-08T00:00:00Z",
  "observed_at": "2026-11-12T15:24:40.221206Z",
  "is_backfill": true,
  "dedupe_key": "16396",
  "detail": {
    "url": "https://www.exploit-db.com/exploits/16396",
    "file": "exploits/windows/remote/16396.rb",
    "kind": "exploit",
    "tags": [
      "Metasploit Framework (MSF)"
    ],
    "type": "remote",
    "title": "Microsoft SQL Server - sp_replwritetovarbin Memory Corruption (MS09-004) (via SQL Injection) (Metasploit)",
    "author": "Metasploit",
    "edb_id": 16396,
    "cve_ids": [
      "CVE-2008-5416"
    ],
    "platform": "windows",
    "verified": true,
    "precision": "day",
    "confidence": "curated",
    "date_added": "2011-02-08",
    "date_updated": "2011-03-10",
    "date_published": "2011-02-08"
  }
}
time unknownsource gave no time
+POCpublic PoC

Metasploit has module exploit/windows/mssql/ms09_004_sp_replwritetovarbin (MS09-004 Microsoft SQL Server sp_replwritetovarbin Memory Corruption). The source gives no release time for the module.

src metasploit exploit/windows/mssql/ms09_004_sp_replwritetovarbin · nday , bulk import · raw
{
  "id": 52908,
  "type": "poc_published",
  "source": "metasploit",
  "url": "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb",
  "occurred_at": null,
  "observed_at": "2026-11-12T15:24:51.477477Z",
  "is_backfill": true,
  "dedupe_key": "exploit/windows/mssql/ms09_004_sp_replwritetovarbin",
  "detail": {
    "url": "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb",
    "kind": "msf_module",
    "path": "/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin.rb",
    "rank": 400,
    "check": true,
    "title": "MS09-004 Microsoft SQL Server sp_replwritetovarbin Memory Corruption",
    "cve_ids": [
      "CVE-2008-5416"
    ],
    "fullname": "exploit/windows/mssql/ms09_004_sp_replwritetovarbin",
    "rank_name": "good",
    "confidence": "curated",
    "module_type": "exploit",
    "module_last_modified": "2026-04-22 11:58:58 +0000",
    "vuln_disclosure_date": "2008-12-09"
  }
}
time unknownsource gave no time
+POCpublic PoC

Metasploit has module exploit/windows/mssql/ms09_004_sp_replwritetovarbin_sqli (MS09-004 Microsoft SQL Server sp_replwritetovarbin Memory Corruption via SQL Injection). The source gives no release time for the module.

src metasploit exploit/windows/mssql/ms09_004_sp_replwritetovarbin_sqli · nday , bulk import · raw
{
  "id": 52909,
  "type": "poc_published",
  "source": "metasploit",
  "url": "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin_sqli.rb",
  "occurred_at": null,
  "observed_at": "2026-11-12T15:24:51.477477Z",
  "is_backfill": true,
  "dedupe_key": "exploit/windows/mssql/ms09_004_sp_replwritetovarbin_sqli",
  "detail": {
    "url": "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin_sqli.rb",
    "kind": "msf_module",
    "path": "/modules/exploits/windows/mssql/ms09_004_sp_replwritetovarbin_sqli.rb",
    "rank": 600,
    "check": true,
    "title": "MS09-004 Microsoft SQL Server sp_replwritetovarbin Memory Corruption via SQL Injection",
    "cve_ids": [
      "CVE-2008-5416"
    ],
    "fullname": "exploit/windows/mssql/ms09_004_sp_replwritetovarbin_sqli",
    "rank_name": "excellent",
    "confidence": "curated",
    "module_type": "exploit",
    "module_last_modified": "2026-04-22 11:58:58 +0000",
    "vuln_disclosure_date": "2008-12-09"
  }
}

Report an error

report an error or omission

Something on this page wrong or missing? Tell the editors; if they accept it, this page's revision log says so publicly. Upstream data is not changed.

Researcher discussion

0 researchers mentioned this in the last 7 days

Posts on X by researchers on nday's list that mention this CVE, shown as posted. nday does not check them.

nday has not collected any post on X by listed researchers that mentions this CVE.

Discussion

0 comments

No comments yet.