Categories
CVE-2026-107385 high CVSS 7.4

SQL Injection in mariadb (CVE-2026-107385)

Summary

SQL injection in mariadb (CVE-2026-107385). Data can be tampered with by attackers. Mitigation: upgrade to 3.5.4 or later.

Original description

The description as published by the source.

Description

When escaping string and binary parameters for the text protocol, the connector always escaped the quote character with a backslash, without ever consulting the session's NO_BACKSLASH_ESCAPES SQL mode. The server status flag was declared (STATUS_NO_BACKSLASH_ESCAPES) but never read.

Under a server or session running with NO_BACKSLASH_ESCAPES, the backslash is an ordinary character and the quote must be escaped by doubling it. The escaped value produced by the connector therefore closed the string literal, and a value passed through a placeholder was interpreted as SQL.

All text-protocol escaping entry points were affected, including Connection.escape().

Impact

An attacker able to influence any value the application passes as a query parameter could execute arbitrary SQL with the privileges of the application's database user: read, modify or delete any data reachable by that connection.

Exposure requires a deployment where NO_BACKSLASH_ESCAPES is enabled — server-wide, through the connector's sessionVariables / initSql options, or by an application-issued SET sql_mode. It is not implied by the ANSI, ORACLE or TRADITIONAL compound modes on MariaDB 11.4, so it has to be set deliberately. Where it is enabled, no unusual application code is needed: the standard placeholder API is the injection point.

execute() and batch() are not affected: the binary prepared-statement and bulk protocols send parameter values out of band.

Resolution

The escaping routi…

Source: GitHub Security Advisories (Global) NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-107385 has been found in mariadb.
Data can be tampered with by attackers. CVSS score: 7.4/10.
What to do: upgrade mariadb to 3.5.4 or later.
If unsure, ask your IT team or search "mariadb CVE-2026-107385" on the vendor's site.

CVE-2026-107385 (mariadb) — CWE-89 / CVSS v3 7.4
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Patched: 3.5.4 — apply immediately
Workaround: Use execute() or batch(), or do not enable NO_BACKSLASH_ESCAPES, until upgraded.
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

SQL injection (CWE-89) exists in mariadb.

📍 Affected scope

Check the vendor advisory for the affected versions of mariadb.

🔥 Severity

Severity: High (CVSS 7.4/10). Data can be tampered with by attackers.

🔧 How to fix

Update to 3.5.4.

🛡️ Workaround

Workaround: Use execute() or batch(), or do not enable NO_BACKSLASH_ESCAPES, until upgraded.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'mariadb' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'mariadb' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で mariadb を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply temporary workaround mitigate
    Use execute() or batch(), or do not enable NO_BACKSLASH_ESCAPES, until upgraded.

    パッチが適用されるまでの応急処置として、Use execute() or batch(), or do not enable NO_BACKSLASH_ESCAPES, until upgraded. を実施。回避策の副作用 (機能低下) を確認した上で。

  3. 3
    Apply patch patch
    Upgrade mariadb to 3.5.4

    ステージング環境で 3.5.4 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  4. 4
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

npm mariadb
[{"type":"SEMVER","events":[{"introduced":"3.5.0-rc.0"},{"fixed":"3.5.4"}]}]
Bitnami mariadb
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.2.5"},{"introduced":"3.3.0"},{"fixed":"3.3.4"},{"introduced":"3.4.0"},{"fixed":"3.4.7"},{"introduced":"3.5.0"},{"fixed":"3.5.4"}]}]
Bitnami mariadb-min
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.2.5"},{"introduced":"3.3.0"},{"fixed":"3.3.4"},{"introduced":"3.4.0"},{"fixed":"3.4.7"},{"introduced":"3.5.0"},{"fixed":"3.5.4"}]}]
Bitnami mysql-client
[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.2.5"},{"introduced":"3.3.0"},{"fixed":"3.3.4"},{"introduced":"3.4.0"},{"fixed":"3.4.7"},{"introduced":"3.5.0"},{"fixed":"3.5.4"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details