---
id: "CVE-2026-85985"
kind: "vulnerability"
aliases: ["CVE-2026-85985"]
title: "MariaDB CONNECT plugin: file UDFs skip FILE privilege and secure_file_priv checks"
severity: "medium"
cvss: 5.4
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "mariadb", "fixed": ["10.6.28"], "affected": ">= 10.6.1, < 10.6.28", "ecosystem": "vendor"}, {"name": "mariadb", "fixed": ["10.11.19"], "affected": ">= 10.11.1, < 10.11.19", "ecosystem": "vendor"}, {"name": "mariadb", "fixed": ["11.4.13"], "affected": ">= 11.4.1, < 11.4.13", "ecosystem": "vendor"}, {"name": "mariadb", "fixed": ["11.8.9"], "affected": ">= 11.8.1, < 11.8.9", "ecosystem": "vendor"}, {"name": "mariadb", "fixed": ["12.3.3"], "affected": ">= 12.3.1, < 12.3.3", "ecosystem": "vendor"}, {"name": "mariadb", "fixed": [], "affected": "= 13.0.1", "ecosystem": "vendor"}]
ecosystems: ["vendor"]
tags: ["database", "mariadb", "package", "self-hosted"]
not_affected_if: ["connect-plugin-not-installed", "trusted-users-only"]
published_at: "2026-10-16T17:17:51+00:00"
first_seen_at: "2026-10-23T21:57:13+00:00"
updated_at: "2026-10-25T04:18:30+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-85985", "first_seen_at": "2026-10-23T21:57:13+00:00"}]
---

# MariaDB CONNECT plugin: file UDFs skip FILE privilege and secure_file_priv checks

Several CONNECT engine plugin functions in MariaDB (json_file, bson_file, jfile_make, bfile_make, jbin_file) do not enforce the FILE privilege or the secure_file_priv setting. A low-privileged database user can use them to read or write files the database account should not reach, limited by operating-system permissions.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- vendor:mariadb affected >= 10.6.1, < 10.6.28 fixed 10.6.28
- vendor:mariadb affected >= 10.11.1, < 10.11.19 fixed 10.11.19
- vendor:mariadb affected >= 11.4.1, < 11.4.13 fixed 11.4.13
- vendor:mariadb affected >= 11.8.1, < 11.8.9 fixed 11.8.9
- vendor:mariadb affected >= 12.3.1, < 12.3.3 fixed 12.3.3
- vendor:mariadb affected = 13.0.1 fixed ?

## How to check

- Run `SELECT VERSION();` in MariaDB and compare against the fixed versions below
- Run `SHOW PLUGINS;` or `SELECT * FROM information_schema.plugins WHERE plugin_name LIKE 'CONNECT';` to see whether the CONNECT plugin is installed
- Check whether `secure_file_priv` is set: `SHOW VARIABLES LIKE 'secure_file_priv';`

## Fix

- Upgrade MariaDB to `10.6.28`, `10.11.19`, `11.4.13`, `11.8.9`, `12.3.3`, or `13.0.2` on the matching release branch
- If upgrading is not possible, uninstall the CONNECT plugin or restrict database accounts so untrusted users cannot call its functions
- The sources do not name a fixed version for the 13.0.1 line; the description says 13.0.2 fixes it

## Timeline

- 2026-10-23T21:57:13+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-85985

## From the sources

MariaDB server is a community developed fork of MySQL server. From 10.6.1 until 10.6.28, 10.11.19, 11.4.13, 11.8.9, 12.3.3, and 13.0.2, the CONNECT engine plugin file-access UDFs json_file(), bson_file(), jfile_make(), bfile_make(), and jbin_file() are affected because each does not enforce FILE privilege or the secure_file_priv setting. A low-privileged attacker can trigger the issue by calling a CONNECT file-access UDF with a filesystem path, then invoke a CONNECT file-access UDF to access a filesystem path and read or write files that the database account is not authorized to access, subject to operating-system permissions. This issue is fixed in versions 10.6.28, 10.11.19, 11.4.13, 11.8.9, 12.3.3, and 13.0.2.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
