# CVE-2026-107385: MariaDB Connector/Node.js: SQL injection in the text protocol when the session uses NO_BACKSLASH_ESCAPES

> SQL injection in MariaDB Connector/Node.js allows attackers to execute arbitrary SQL when NO_BACKSLASH_ESCAPES mode is enabled.

- **Severity:** High 7.4 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 Oct 2026
- **Updated:** 9 Oct 2026
- **Also known as:** BIT-mariadb-2026-107385, BIT-mariadb-min-2026-107385, BIT-mysql-client-2026-107385, GHSA-r3rv-jm3r-62q2

## What is CVE-2026-107385?

CVE-2026-107385 is a high-severity SQL injection vulnerability in mariadb-corporation mariadb-connector-nodejs, published on 8 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

MariaDB Connector/Node.js is used to connect applications developed on Node.js to MariaDB and MySQL databases. Prior to 3.2.5, 3.3.4, 3.4.7, and 3.5.4, text-protocol escaping always prefixes quotes with a backslash and does not honor the session's NO_BACKSLASH_ESCAPES mode, including in Connection.escape(). When that mode is enabled, the backslash is an ordinary character, so an attacker-controlled placeholder value can close the SQL string literal and inject arbitrary SQL with the application's database privileges. The vulnerable configuration may be enabled server-wide, through connector initialization options, or with an application-issued SET sql_mode; execute() and batch() use binary protocols and are not affected. This issue is fixed in versions 3.2.5, 3.3.4, 3.4.7, and 3.5.4.

Weakness: CWE-89 (Improper Neutralization of Special Elements used in an SQL Command)

## Which versions are affected by CVE-2026-107385?

11 open source packages ship an affected version, including mariadb, mariadb-min and mysql-client.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `mariadb` | Bitnami | All versions | 3.2.5, 3.3.4, 3.4.7, 3.5.4 |
| `mariadb` | npm | All versions | 3.2.5 |
| `mariadb` | npm | All versions | 3.2.5 |
| `mariadb` | npm | From 3.3.0 | 3.3.4 |
| `mariadb` | npm | From 3.3.0 | 3.3.4 |
| `mariadb` | npm | From 3.4.0 | 3.4.7 |
| `mariadb` | npm | From 3.4.0 | 3.4.7 |
| `mariadb` | npm | From 3.5.0-rc.0 | 3.5.4 |
| `mariadb` | npm | From 3.5.0-rc.0 | 3.5.4 |
| `mariadb-min` | Bitnami | All versions | 3.2.5, 3.3.4, 3.4.7, 3.5.4 |
| `mysql-client` | Bitnami | All versions | 3.2.5, 3.3.4, 3.4.7, 3.5.4 |

## How do I fix CVE-2026-107385?

Upgrade mariadb to a fixed version for your release line: 3.2.5, 3.3.4, 3.4.7 or 3.5.4.

## Is CVE-2026-107385 being exploited?

There is no known exploitation of CVE-2026-107385 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-107385 and fix it if it is affected.

What it is: CVE-2026-107385 is a high-severity SQL injection vulnerability in mariadb-corporation mariadb-connector-nodejs, published on 8 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-107385 in the wild and no public exploit code.

Affected packages and fixed versions:
- mariadb (Bitnami): affected all versions; fixed in 3.2.5, 3.3.4, 3.4.7, 3.5.4
- mariadb (npm): affected all versions; fixed in 3.2.5
- mariadb (npm): affected all versions; fixed in 3.2.5
- mariadb (npm): affected from 3.3.0; fixed in 3.3.4
- mariadb (npm): affected from 3.3.0; fixed in 3.3.4
- mariadb (npm): affected from 3.4.0; fixed in 3.4.7
- mariadb (npm): affected from 3.4.0; fixed in 3.4.7
- mariadb (npm): affected from 3.5.0-rc.0; fixed in 3.5.4
- mariadb (npm): affected from 3.5.0-rc.0; fixed in 3.5.4
- mariadb-min (Bitnami): affected all versions; fixed in 3.2.5, 3.3.4, 3.4.7, 3.5.4
- mysql-client (Bitnami): affected all versions; fixed in 3.2.5, 3.3.4, 3.4.7, 3.5.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-107385/ (Markdown: https://insights.sbomify.com/CVE-2026-107385/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-107385
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-107385
- OSV: https://osv.dev/vulnerability/CVE-2026-107385

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-107385/
Summaries are generated and may contain mistakes; the official description above is the record.
