MariaDB: Use-after-free with a large number of SYS_REFCURSOR's
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.
- Products
- mysql-client
- Affected versions
- Not specified
- Fixed versions
- 12.3.3, 13.0.2
- CVEs
- CVE-2026-85748
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 17:58 UTC · Revision 1
Source evidence
MariaDB: Use-after-free with a large number of SYS_REFCURSOR's
core-osv · Original sourcePublished 21 Oct 2026, 08:56 UTC
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.
osv:BIT-mysql-client-2026-85748
mysql-client
Fixed versions: 12.3.3, 13.0.2
Complete source record
{
"id": "c551fa8f6c0b8fa4218758de21480322535d5272ca840a910f7841f7fee2f46f",
"url": "https://osv.dev/vulnerability/BIT-mysql-client-2026-85748",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "MariaDB: Use-after-free with a large number of SYS_REFCURSOR's",
"summary": "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.",
"evidence": "osv:BIT-mysql-client-2026-85748",
"products": [
{
"name": {
"value": "mysql-client",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "12.3.3",
"evidence": "/affected/0/ranges"
},
{
"value": "13.0.2",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "critical",
"structured": {
"id": "BIT-mysql-client-2026-85748",
"aliases": [
"BIT-mariadb-2026-85748",
"BIT-mariadb-min-2026-85748",
"BIT-mysql-client-2026-85748",
"CVE-2026-85748",
"GHSA-mv8g-9f7q-hprm"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "12.3.1"
},
{
"fixed": "12.3.3"
},
{
"introduced": "13.0.0"
},
{
"fixed": "13.0.2"
}
]
}
],
"package": {
"name": "mysql-client",
"purl": "pkg:bitnami/mysql-client",
"ecosystem": "Bitnami"
},
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
}
],
"database_specific": {
"source": "https://github.com/bitnami/vulndb/tree/main/data/mysql-client/BIT-mysql-client-2026-85748.json"
}
}
],
"modified": "2026-10-22T09:00:03.303557281Z",
"provider": "osv",
"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",
"https://jira.mariadb.org/browse/MDEV-40396",
"https://jira.mariadb.org/browse/MDEV-40639",
"https://nvd.nist.gov/vuln/detail/CVE-2026-85748"
],
"provider_metadata": {
"cpes": [
"cpe:2.3:a:mariadb:mariadb:*:*:*:*:*:*:*:*"
],
"severity": "Critical"
}
},
"related_cves": [
{
"value": "CVE-2026-85748",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/database_specific/severity"
},
"source_id": "core-osv",
"document_id": 405337,
"published_at": "2026-10-21T08:56:37.698+00:00"
}