{"id":"CVE-2026-85748","published":"2026-10-16T17:17:51.303","lastModified":"2026-10-16T18:09:12.750","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.","cvssScore":9.9,"cvssSeverity":"CRITICAL","cvssVector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","cwes":["CWE-416"],"vendors":[],"products":[],"references":[{"url":"https://github.com/MariaDB/server/commit/91156c3de58762196605150ab3f756fe952592d1","tags":[]},{"url":"https://github.com/MariaDB/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed","tags":[]},{"url":"https://github.com/MariaDB/server/releases/tag/mariadb-12.3.3","tags":[]},{"url":"https://github.com/MariaDB/server/releases/tag/mariadb-13.0.2","tags":[]},{"url":"https://github.com/MariaDB/server/security/advisories/GHSA-mv8g-9f7q-hprm","tags":[]},{"url":"https://jira.mariadb.org/browse/MDEV-40396","tags":[]},{"url":"https://jira.mariadb.org/browse/MDEV-40639","tags":[]}],"exploitRefs":[{"url":"https://github.com/MariaDB/server/commit/91156c3de58762196605150ab3f756fe952592d1","tags":[]},{"url":"https://github.com/MariaDB/server/commit/9b075b2cb53338f67e7230cc585e02d2d34514ed","tags":[]},{"url":"https://github.com/MariaDB/server/releases/tag/mariadb-12.3.3","tags":[]},{"url":"https://github.com/MariaDB/server/releases/tag/mariadb-13.0.2","tags":[]},{"url":"https://github.com/MariaDB/server/security/advisories/GHSA-mv8g-9f7q-hprm","tags":[]}],"hasPoc":true,"ai":{"summary":"A use-after-free vulnerability in MariaDB's SYS_REFCURSOR handling allows low-privileged attackers to trigger remote code execution through cursor array reallocation. This affects versions 12.3.1-12.3.3 and 13.0.1-13.0.2 where stale references can persist in routine contexts.","exploitability":"Exploitation requires a low-privileged user to open many SYS_REFCURSORs and trigger a fetch operation, with additional vulnerability needed for full RCE, making it moderately difficult but possible.","blast_radius":"The vulnerability could impact database servers handling multiple concurrent users, especially in environments where untrusted users have access to database operations.","remediation":"Upgrade to MariaDB 12.3.3 or 13.0.2 to remediate the use-after-free vulnerability in SYS_REFCURSOR handling.","detection":"No reliable host or network indicator is derivable from the published description.","tags":["database","rce","memory-corruption"],"model":"garnet-coder","analyzedAt":"2026-10-17T08:45:24.487Z"}}