{"id":"CVE-2026-85748","kind":"vulnerability","aliases":["CVE-2026-85748"],"related":[],"title":"MariaDB server is a community developed fork of MySQL server","description":"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.","summary":"MariaDB server versions 12.3.1 through 12.3.3 and 13.0.2 mishandle SYS_REFCURSOR cursor-array reallocation, leaving stale references that cause a use-after-free. A low-privileged database user can trigger it, and it can enable remote code execution when chained with another vulnerability.","severity":"critical","cvss":9.9,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"mariadb","fixed":["12.3.3"],"affected":">= 12.3.1, < 12.3.3","ecosystem":"vendor"},{"name":"mariadb","fixed":[],"affected":"= 13.0.1","ecosystem":"vendor"}],"ecosystems":["vendor"],"tags":["database","mariadb","runtime","self-hosted"],"not_affected_if":["mysql-only-deployments","versions-outside-affected-range"],"how_to_check":"Run SELECT VERSION(); on the MariaDB server and check whether it reports 12.3.1, 12.3.2, or 13.0.0-13.0.2 range builds before the fixed releases.","fix":"Upgrade MariaDB to 12.3.3 or 13.0.2 (or later in the same branch).","status":"open","published_at":"2026-10-16T17:17:51+00:00","first_seen_at":"2026-10-23T21:57:13+00:00","triaged_at":"2026-10-23T21:59:58+00:00","updated_at":"2026-10-23T22:28:55+00:00","category":"runtime","confidence":0.7,"triage":{"at":"2026-10-23T21:59:58Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade MariaDB to 12.3.3 or 13.0.2 (or later in the same branch).\nunknown","reach":"network","impact":"high","summary":"MariaDB server versions 12.3.1 through 12.3.3 and 13.0.2 mishandle SYS_REFCURSOR cursor-array reallocation, leaving stale references that cause a use-after-free. A low-privileged database user can trigger it, and it can enable remote code execution when chained with another vulnerability.","category":"runtime","who_cares":["mariadb","self-hosted","database"],"confidence":0.7,"needs_auth":"yes","worst_case":"Low-privileged database user may achieve remote code execution when chained.","analyst_note":"Sources give only the NVD entry; check the MariaDB security advisory for the exact affected version ranges and any mitigation besides upgrading.","how_to_check":"Run SELECT VERSION(); on the MariaDB server and check whether it reports 12.3.1, 12.3.2, or 13.0.0-13.0.2 range builds before the fixed releases.\nunknown","needs_analyst":true,"not_affected_if":["mysql-only-deployments","versions-outside-affected-range"],"user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"critical"},"cost_usd":0.000512,"input_tokens":2833,"output_tokens":457,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2026':12A,15A '-85748':13A,16A '12.3.1':28B,82C '12.3.3':30B,84C,145C '13.0.2':32B,86C,147C 'affect':91C 'anoth':69B,137C 'array':38B,95C 'attack':108C 'caus':44B 'chain':67B 'code':64B,132C 'combin':135C 'communiti':5A,75C 'context':103C 'cursor':37B,94C 'cursor-array':36B,93C 'cve':11A,14A 'databas':19B,54B 'develop':6A,76C 'enabl':62B,130C 'execut':65B,133C 'fetch':119C 'fix':142C 'fork':7A,77C 'free':49B,127C 'handl':89C 'host':24B 'issu':140C 'larg':112C 'leav':40B,98C 'low':52B,106C 'low-privileg':51B,105C 'mariadb':1A,17A,18A,20B,25B,71C 'mishandl':33B 'mysql':9A,79C 'number':113C 'one':120C 'open':110C 'privileg':53B,107C 'realloc':39B,96C 'refcursor':35B,88C,116C 'refer':42B,100C 'remot':63B,131C 'routin':102C 'runtim':21B 'self':23B 'self-host':22B 'server':2A,10A,26B,72C,80C 'stale':41B,99C 'sys':34B,87C,115C 'trigger':57B,122C 'use':47B,125C 'use-after-fre':46B,124C 'user':55B 'version':27B,144C 'vulner':70B,138C","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-16T17:17:51+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-85748","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-85748","severity":null,"published_at":"2026-10-16T17:17:51+00:00","modified_at":"2026-10-20T15:32:54+00:00","first_seen_at":"2026-10-23T21:57:13+00:00","fetched_at":"2026-10-23T22:28:55+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}