IT SBIT Services
Schneeberger
DEEN
CVE tracker

MariaDB Server: Use-after-free in SYS_REFCURSOR handling

CVE-2026-85748Critical 9.9

← All vulnerabilities

Summary

MariaDB Server, a community-developed fork of MySQL, contains a use-after-free flaw in the handling of SYS_REFCURSOR objects. When a large number of cursors is opened inside routines and one of them is fetched, stale references can be used after memory has been freed. A low-privileged database user can trigger the flaw remotely; the vendor states that remote code execution is possible when it is combined with a second vulnerability.

Affected

  • MariaDB Server 12.3.1 to 12.3.2
  • MariaDB Server 13.0.1
  • Note: the affected ranges in the sources differ slightly; the vendor advisory is authoritative.

Fixed in

  • MariaDB Server 12.3.3
  • MariaDB Server 13.0.2

Workaround

  • No workaround known. The vendor advises upgrading immediately.

Exploitation

  • No confirmed in-the-wild exploitation or public proof of concept known at the time of research.
  • CISA SSVC: Exploitation none, Automatable no, Technical Impact total.
  • Requires an authenticated low-privileged database account.

Our recommendation

  • Upgrade MariaDB Server to 12.3.3 or 13.0.2 without delay.
  • Identify all MariaDB instances and verify their versions.
  • Restrict database accounts to the minimum necessary privileges and review accounts with routine creation rights.
  • Monitor database logs for unusual cursor usage and errors.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 30 Oct 2026, 15:17.

Original description (NVD)

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.

NVD references (7)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.