Skip to content
Heist/ feed
Back to feed
CriticalFix available

MariaDB: Use-after-free with a large number of SYS_REFCURSOR's

Type: advisorySources: OSV

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
mariadb
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 source

Published 21 Oct 2026, 08:52 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-mariadb-2026-85748

mariadb

Fixed versions: 12.3.3, 13.0.2

Complete source record
{
  "id": "639cea2ce76276f3cee925e988c6ceec2b30ca594e14f331bc896c203246887a",
  "url": "https://osv.dev/vulnerability/BIT-mariadb-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-mariadb-2026-85748",
    "products": [
      {
        "name": {
          "value": "mariadb",
          "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-mariadb-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": "mariadb",
            "purl": "pkg:bitnami/mariadb",
            "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/mariadb/BIT-mariadb-2026-85748.json"
          }
        }
      ],
      "modified": "2026-10-22T09:00:03.365318828Z",
      "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": 405340,
  "published_at": "2026-10-21T08:52:56.896+00:00"
}