/

CVE-2026-44170

Severity:

CRITICAL RISK

(9.8)

OS Command Injection (CWE-78) in MariaDB CONNECT REST

CVE-2026-44170

Modified

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution on Database Server Host

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A command injection flaw in MariaDB's CONNECT storage engine on Windows allows HTTP table attributes to be interpolated directly into a curl command line without proper sanitization.

When REST support is enabled, a user who can define or modify CONNECT/REST tables may execute arbitrary shell commands on the database server host.

Affected context

The vulnerability arises in MariaDB deployments on Windows that:

  • Have the CONNECT storage engine installed and REST support enabled
  • Allow users (including potentially low-privileged DB users) to create or alter CONNECT tables using HTTP/REST options
  • Construct outbound HTTP requests via curl from within the database server process

In such configurations, untrusted table attributes are incorporated into the underlying command line that curl uses, creating an opportunity for command injection if those attributes are not tightly controlled or validated.

Exploit preconditions

  • Attack surface: SQL interface to the MariaDB server on Windows (network-exposed or local).
  • Required access: Ability to create, alter, or otherwise control CONNECT tables with REST/HTTP attributes; this may be granted to authenticated database users with specific privileges.
  • Trigger point: Execution of a CONNECT table operation (e.g., SELECT, DML, or metadata operations) that causes the server to invoke curl with attacker-controlled attributes.
  • Why exploitation is possible: User-supplied HTTP attributes are interpolated into a shell command used to launch curl without robust validation, quoting, or escaping, allowing those attributes to break out of the intended argument context and inject additional OS commands.

Why this happens

This issue is a classic OS Command Injection (CWE-78) vulnerability.

Instead of invoking curl via a safe API that separates executable path and arguments, the implementation constructs a command line string that includes user-controlled HTTP table attributes.

Because this string is passed to the operating system command interpreter on Windows, special characters, meta-sequences, or additional tokens in the attributes can alter the command structure and cause arbitrary commands to run.

The core insecure pattern is treating configuration-like user input as trusted when assembling a shell command, rather than binding it as strictly delimited arguments.

Potential impact

  • Execution of arbitrary commands on the Windows host running MariaDB
  • Full compromise of the database server, including read/write access to data files
  • Use of the database server as a pivot point for lateral movement within the network
  • Installation of backdoors, ransomware, or other persistent malware on the host
  • Exfiltration or destruction of sensitive data stored in MariaDB or on the underlying system

General mitigation guidance

Effective mitigation focuses on eliminating direct command-line construction and tightening trust boundaries around CONNECT/REST features:

  • Prefer library or API-level HTTP clients that avoid invoking the shell, passing user-controlled values as structured arguments rather than concatenated strings.
  • Apply strict validation and canonicalization to CONNECT/REST attributes, using allow-lists for expected values and rejecting unexpected characters or patterns.
  • Restrict who can use the CONNECT engine and REST features; grant CONNECT-related privileges only to trusted service accounts instead of general users.
  • Run the MariaDB service account with least-privilege on Windows so that, if a command is injected, its capabilities are constrained.
  • Where possible, disable the CONNECT engine or REST support entirely in environments that do not explicitly require it, reducing unnecessary attack surface.

How teams detect issues like this

Detection should combine code-level analysis with operational monitoring:

  • Use static analysis or manual code review to flag any code paths that construct shell commands from user-controlled strings, particularly in storage engine and plugin code.
  • Define secure coding guidelines that prohibit shell invocation for network calls when safer APIs are available, and enforce them through pre-commit hooks or CI rules.
  • Monitor database activity for suspicious CONNECT/REST table definitions containing unusual characters, command separators, or atypical HTTP attributes.
  • Instrument host-level logging on the Windows server to detect unexpected child processes spawned by the MariaDB service, especially recurring curl invocations or command shells.
  • Include automated database configuration scanning in security reviews to identify instances where the CONNECT engine and REST support are enabled inappropriately.

Sources

SourceLink
github.comgithub.com/MariaDB/server/security/advisories/GHSA-f835-cfjq-wf73
jira.mariadb.orgjira.mariadb.org/browse/MDEV-39289
access.redhat.comaccess.redhat.com/errata/RHSA-2026:25143
access.redhat.comaccess.redhat.com/errata/RHSA-2026:25145
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33093
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33412
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33464
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33481
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33482
access.redhat.comaccess.redhat.com/errata/RHSA-2026:49522
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-44170
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2488451
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-44170.json

Frequently asked

questions

Exploitability depends on who can define or alter CONNECT tables with REST attributes; in environments where many users have these privileges and MariaDB is network-accessible, the exposure can be wide.

No, the attacker typically only needs database-level access with sufficient privileges to manipulate CONNECT/REST table definitions or attributes; the OS-level commands are executed by the MariaDB service itself.

The safest pattern is to stop building shell command lines from user-controlled input and instead use dedicated APIs or libraries for HTTP calls, combined with strict validation and least-privilege execution of the database service.

Avoid using shell commands as an integration mechanism when safer interfaces exist, treat all configuration and metadata fields as untrusted by default, apply allow-list validation, and subject storage engines and plugins to targeted security review for injection patterns.

Find out what's already
exploitable in your codebase.