MariaDB server is a community developed fork of MySQL server. From 12.3.1 until 12.3.3 and 13.0.2, SYS_REFCURSOR handling is affected because cursor-array reallocation can leave stale references in routine contexts. A low-privileged attacker can open a large number of SYS_REFCURSORs and then fetch one to trigger a use-after-free that can enable remote code execution when combined with another vulnerability. This issue is fixed in versions 12.3.3 and 13.0.2.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-416"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/85xxx/CVE-2026-85748.json"
}{
"extracted_events": [
{
"cpe": "cpe:2.3:a:mariadb:mariadb:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "12.3.1"
},
{
"fixed": "12.3.3"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:mariadb:mariadb:13.0.1:*:*:*:*:*:*:*",
"range": [
{
"introduced": "13.0.1"
},
{
"last_affected": "13.0.1"
}
],
"source": "CPE_STRING"
},
{
"range": [
{
"fixed": "91156c3de58762196605150ab3f756fe952592d1"
}
],
"source": "REFERENCES_COMMIT"
},
{
"range": [
{
"fixed": "9b075b2cb53338f67e7230cc585e02d2d34514ed"
}
],
"source": "REFERENCES_COMMIT"
},
{
"original_tag": "mariadb-12.3.3",
"range": [
{
"fixed": "83e909fc2a0dbc394b4b683fb3fa2d7dcf26cc5e"
}
],
"source": "REFERENCES_TAG"
},
{
"original_tag": "mariadb-13.0.2",
"range": [
{
"fixed": "620a4b5624222048fece7fe1789978ae0675cae2"
}
],
"source": "REFERENCES_TAG"
}
]
}
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-85748.json"
[
{
"deprecated": false,
"digest": {
"line_hashes": [
"147634096428746672817589211826874914217",
"264218605635566994103049931190065043392",
"93059346363077071389934165077777269670",
"32606000899084774974995696645174290923",
"256470140531517088316131929870478116074",
"334025703810761558826816691979479854580",
"260650851485006555125670183863417832281",
"6446061783755308718716871148313040108",
"312241741745348079345587414316005868937",
"249070154595042558026092911561919782058",
"201922339599851071781543469607174807181",
"317736600931175531516903898461239907702",
"327696732473022492486016762919381785482",
"216949515008135197200359727928658850476",
"218931148490566805285297229918024354648",
"146507302729116252891823464981535210285",
"142659338570842672387971352349600003870",
"137120398366252513036167874168405776840",
"261698940787071431021676354712660564493",
"19691059486465815104171932774416842043"
],
"threshold": 0.9
},
"id": "CVE-2026-85748-11114313",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed",
"target": {
"file": "sql/sql_cursor.h"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "123589678019221749616824148064709098377",
"length": 278
},
"id": "CVE-2026-85748-1a324968",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed",
"target": {
"file": "sql/sql_cursor.cc",
"function": "Materialized_cursor::Materialized_cursor"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "339712868486696881928202886484344029960",
"length": 1715
},
"id": "CVE-2026-85748-1cd3e8db",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/83e909fc2a0dbc394b4b683fb3fa2d7dcf26cc5e",
"target": {
"file": "sql/log_event_server.cc",
"function": "Rows_log_event_fragmenter::fragment"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "116555314639431225552546055462644339575",
"length": 676
},
"id": "CVE-2026-85748-1dcb276f",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed",
"target": {
"file": "sql/sql_cursor.cc",
"function": "Materialized_cursor::fetch"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "299447809603358153700916450412962178074",
"length": 207
},
"id": "CVE-2026-85748-206c4d28",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/91156c3de58762196605150ab3f756fe952592d1",
"target": {
"file": "sql/sp_cursor.cc",
"function": "sp_cursor_array::append"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "200541580681219863157402230782325415918",
"length": 795
},
"id": "CVE-2026-85748-39641cae",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed",
"target": {
"file": "sql/sql_cursor.cc",
"function": "Materialized_cursor::send_result_set_metadata"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "325269805929406266775082193038842109173",
"length": 1024
},
"id": "CVE-2026-85748-6724080c",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed",
"target": {
"file": "sql/sql_prepare.cc",
"function": "mysqld_stmt_fetch"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"305919723178372905307476558900672125602",
"15477761012734850870264980369607845488",
"22867029889593440646145355393895538351",
"171057096046906318564748824301480226396"
],
"threshold": 0.9
},
"id": "CVE-2026-85748-696f6e81",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed",
"target": {
"file": "sql/sql_prepare.cc"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"95401432262285864289727764770360270049",
"173858333972921861730223540428063151746",
"6395131939912486290005393413270621370",
"112758043799319656839120225735569319027",
"227680373405189667520325378722752598719",
"329809240000564458509020147985264951635",
"250012344493185600732218777150520444254",
"189300358944676474018157103204561982007",
"39134895049890726902475669830800470756",
"282527200070356953755441266631239708211",
"2199211571857100759993057847131806087",
"193561955042841006913104876816822765126",
"177192680367858980002194211552322142431",
"313055511488228682258125116294661051678",
"274237918821090648292108816785422999228",
"192953351640583377225228165692664397403",
"148230588834708419983669685173846319934",
"17775036714072180829779075959561761671",
"209801334083865370981138114490637288035",
"118170968486781745841638804755411918117",
"274945332742840704820992847857512428031",
"338802578454811662390593858726029175107",
"30801892076092230621506956800691016232",
"53103594581997229539721946425169959068",
"100703287449164352503891681919786094935",
"44978891084042834765103101112639956039",
"210636298560267103659466734594770515912",
"228602096093597974258429886306441039102",
"45424754930211686348705262211587394416",
"285375424964525665849711366377661732398"
],
"threshold": 0.9
},
"id": "CVE-2026-85748-6fe4523b",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed",
"target": {
"file": "sql/sql_cursor.cc"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"55601185992038651957764628585522404256",
"253903187750619465468849948296848268216",
"22363387449553248330256438789104807933",
"126411442502257753494470271392614921706"
],
"threshold": 0.9
},
"id": "CVE-2026-85748-972d934e",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed",
"target": {
"file": "sql/sp_rcontext.cc"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"179484601554282248421957359814593662752",
"217296992938705788746344754329649421971",
"152381053987735789047405435012651377765",
"246857480619807609422085692930980112267",
"105364165743082597100651047791488308340",
"101236769662509795863691432540032477335",
"140686259584866756218482371478782608243",
"75711869309814110195815921166864237172",
"9509112232340120216687920542090502227",
"154048089810703905898336898736497860497",
"140268224953907141938400212906220017967",
"20535089908579669436607381542129569621",
"335034980573478587058590883503553524190"
],
"threshold": 0.9
},
"id": "CVE-2026-85748-c2dd728b",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/91156c3de58762196605150ab3f756fe952592d1",
"target": {
"file": "sql/sp_cursor.cc"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "196397068537667303874185663947797581774",
"length": 1411
},
"id": "CVE-2026-85748-c8197dfb",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed",
"target": {
"file": "sql/sql_cursor.cc",
"function": "mysql_open_cursor"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "155468655601802029763617052634982786219",
"length": 516
},
"id": "CVE-2026-85748-d22b9570",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/91156c3de58762196605150ab3f756fe952592d1",
"target": {
"file": "sql/sp_cursor.cc",
"function": "sp_cursor_array::get_cursor_by_ref"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"16077091414809241855785344458300688771",
"80169925375605645352512357842864689972",
"244952623127875872819581143148576940275",
"119071852490711346838907041285938645487",
"185487590931057120595869693414375839242",
"211932935573192975895134762926662803031",
"228055661435804887442689404609697085127",
"5853045128050446084054698735499918485",
"47450972092959026007760572413299578015",
"55370113708409799662418624143657539306",
"124561616630979313141545532586665395189",
"273770662788778214891731905465220426420",
"20996878136735197330101078579628194324",
"336463056318416941450406690556537526418",
"145841850614970687987744184975348410136",
"45228288323458225370872442482641914475",
"308652542242809247814344705235183855891",
"67904140459949367193937567233968080004",
"7847121589731674361723935017837912204",
"135340182065125493513823964495568424851",
"43627460998787157536997785577098031653",
"84309656394255175019384312621663517713",
"150165939096747049205702141981118633808",
"25524483159002909470074676493151453964",
"138902201493505532941155467082886358884",
"293082655094558895167594431064545008715",
"217324547565499157828623369105664615380",
"324932974942305697325512634812385981583",
"263194770976457956270926810302851040056",
"118804872093470979568017079681683220961",
"327488446838072914618014290352294782899",
"247402852312702313575595894363066222349",
"9286553501134135342717819495572883182",
"144311766211927256705166237325307665111",
"332762977284567395270251814527360601272",
"33095416015865359191060553885338399542"
],
"threshold": 0.9
},
"id": "CVE-2026-85748-d66cf2e9",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/91156c3de58762196605150ab3f756fe952592d1",
"target": {
"file": "sql/sp_cursor.h"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"171922335289695664967320282302097012127",
"314879264303882873216162120692739820747",
"296657960952465744719770094395708912555",
"28908880241426286725700820784852115102"
],
"threshold": 0.9
},
"id": "CVE-2026-85748-e432b228",
"signature_type": "Line",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/83e909fc2a0dbc394b4b683fb3fa2d7dcf26cc5e",
"target": {
"file": "sql/log_event_server.cc"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "70454263479397409087592665481803765131",
"length": 663
},
"id": "CVE-2026-85748-e975d5c9",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed",
"target": {
"file": "sql/sql_cursor.cc",
"function": "Select_materialize::send_result_set_metadata"
}
},
{
"deprecated": false,
"digest": {
"function_hash": "204439434374202790476741881119397536125",
"length": 1154
},
"id": "CVE-2026-85748-f85e932a",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/mariadb/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed",
"target": {
"file": "sql/sp_rcontext.cc",
"function": "sp_cursor::fetch"
}
}
]
"2026-10-28T11:00:45Z"