CVE-2026-85748·MariaDB vulnerability
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.
- Severity
- critical
- Software
- MariaDB
- Fixed in
- 12.3.3
- Published
How likely is exploitation
FIRST's Exploit Prediction Scoring System puts the probability of this CVE being exploited in the next 30 days at 0.55% — higher than 45% of all published CVEs. EPSS is an independent forecast of exploitation, not a severity rating: it says nothing about how much damage a successful attack does, which is what a CVSS score measures.
Read the two together. CVE-2026-85748 scores 9.9 on CVSS, so a successful attack would be serious — but at 0.55%, almost nobody is currently attempting it. That is a different situation from a flaw under mass exploitation, and it is usually the difference between patching on your next maintenance window and patching tonight.
Affected versions
From: 12.3.1
Until: 12.3.3
Fixed in: 12.3.3
How to fix this CVE
Update MariaDB to version 12.3.3 or later to patch a critical use-after-free vulnerability in SYS_REFCURSOR handling. Attackers with database access can exploit improper cursor memory management to achieve remote code execution. Prioritize this update immediately given the critical CVSS score and potential for privilege escalation.
sudo dnf update mariadb-serverDefensia detects this vulnerability
How to check if you are affected
- Check installed MariaDB version: mariadb --version or mysql --version
- Query the server version from MariaDB prompt: SELECT VERSION(); — confirm version is between 12.3.1 and 12.3.3 (vulnerable range)
- Verify SYS_REFCURSOR usage in stored procedures: SELECT ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%SYS_REFCURSOR%';
- After patching, confirm version is 12.3.3+: SELECT VERSION(); and verify no segmentation faults in error logs: tail -50 /var/log/mysql/error.log | grep -i 'segmentation\|fatal\|core'
FAQ
What is CVE-2026-85748?
A critical use-after-free vulnerability in MariaDB's SYS_REFCURSOR implementation where cursor array reallocation leaves dangling pointers in routine execution contexts. Low-privileged database users can trigger this defect to achieve remote code execution.
Is CVE-2026-85748 being actively exploited?
No, this vulnerability is not currently listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are publicly available. However, the critical severity warrants immediate patching.
What versions of MariaDB are affected by CVE-2026-85748?
MariaDB versions 12.3.1, 12.3.2, and 12.3.3 (before the fix) are vulnerable. Version 13.0.2 and later, and 12.3.3 (patched) are not affected.
How do I check if my server is vulnerable to CVE-2026-85748?
Run 'mariadb --version' and check if the version falls within 12.3.1 to 12.3.3. Alternatively, connect to MariaDB and execute 'SELECT VERSION();' to confirm the running version.
Does Defensia detect CVE-2026-85748?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If MariaDB is installed on a monitored server, CVE-2026-85748 will appear in your dashboard with remediation steps.
Related MariaDB CVEs
References
- https://github.com/MariaDB/server/commit/91156c3de58762196605150ab3f756fe952592d1
- https://github.com/MariaDB/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed
- https://github.com/MariaDB/server/releases/tag/mariadb-12.3.3
- https://github.com/MariaDB/server/releases/tag/mariadb-13.0.2
- https://github.com/MariaDB/server/security/advisories/GHSA-mv8g-9f7q-hprm
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-85748. Free for 1 server.
Get started free