{"id":"CVE-2026-107385","aliases":["CVE-2026-107385","GHSA-r3rv-jm3r-62q2","BIT-MARIADB-2026-107385","BIT-MARIADB-MIN-2026-107385","BIT-MYSQL-CLIENT-2026-107385"],"related":[],"kind":"vulnerability","state":"published","title":"MariaDB Connector/Node.js: SQL injection in the text protocol when the session uses NO_BACKSLASH_ESCAPES","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Description\nWhen 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.\n\nUnder 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.\n\nAll text-protocol escaping entry points were affected, including Connection.escape().\n\n### Impact\nAn 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.\n\nExposure 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.\n\nexecute() and batch() are not affected: the binary prepared-statement and bulk protocols send parameter values out of band.\n\n### Resolution\nThe escaping routines now branch on the session status flag, doubling the quote and leaving the backslash untouched when NO_BACKSLASH_ESCAPES is set\n\n### Workarounds\nUse execute() or batch(), or do not enable NO_BACKSLASH_ESCAPES, until upgraded.\n\n### Credit\nReported by fg0x0.","format":"markdown","source":"ghsa"}],"published":"2026-10-08T18:38:29.490Z","modified":"2026-10-16T09:55:57.878Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H","score":7.4,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H","score":7.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H","score":7.4,"rating":"HIGH"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"HIGH"}],"cwes":["CWE-89"],"affected":[{"ranges":[{"version":"< 3.2.5","status":"affected"},{"version":">= 3.3.0, < 3.3.4","status":"affected"},{"version":">= 3.4.0, < 3.4.7","status":"affected"},{"version":">= 3.5.0-rc.0, < 3.5.4","status":"affected"}],"vendor":"mariadb-corporation","product":"mariadb-connector-nodejs","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.2.5"}],"ecosystem":"npm","package":"mariadb","purl":"pkg:npm/mariadb","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.3.0","status":"affected","fixed":"3.3.4"}],"ecosystem":"npm","package":"mariadb","purl":"pkg:npm/mariadb","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.4.0","status":"affected","fixed":"3.4.7"}],"ecosystem":"npm","package":"mariadb","purl":"pkg:npm/mariadb","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.5.0-rc.0","status":"affected","fixed":"3.5.4"}],"ecosystem":"npm","package":"mariadb","purl":"pkg:npm/mariadb","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.2.5"},{"type":"semver","introduced":"3.3.0","status":"affected","fixed":"3.3.4"},{"type":"semver","introduced":"3.4.0","status":"affected","fixed":"3.4.7"},{"type":"semver","introduced":"3.5.0","status":"affected","fixed":"3.5.4"}],"ecosystem":"Bitnami","package":"mariadb","purl":"pkg:bitnami/mariadb","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.2.5"},{"type":"semver","introduced":"3.3.0","status":"affected","fixed":"3.3.4"},{"type":"semver","introduced":"3.4.0","status":"affected","fixed":"3.4.7"},{"type":"semver","introduced":"3.5.0","status":"affected","fixed":"3.5.4"}],"ecosystem":"Bitnami","package":"mariadb-min","purl":"pkg:bitnami/mariadb-min","source":"bitnami"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.2.5"},{"type":"semver","introduced":"3.3.0","status":"affected","fixed":"3.3.4"},{"type":"semver","introduced":"3.4.0","status":"affected","fixed":"3.4.7"},{"type":"semver","introduced":"3.5.0","status":"affected","fixed":"3.5.4"}],"ecosystem":"Bitnami","package":"mysql-client","purl":"pkg:bitnami/mysql-client","source":"bitnami"}],"references":[{"url":"https://github.com/mariadb-corporation/mariadb-connector-nodejs/security/advisories/GHSA-r3rv-jm3r-62q2","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/6995c8cf8e51b2ad055de63dcaa4094eebbef5ce","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/7670d90949307e735c0ae148d80b3776478a599d","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/95886df9fa0cca991e2be339caa6c3979be61553","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/mariadb-corporation/mariadb-connector-nodejs/commit/e5a9d732d9574177749488336319b73074072779","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://hackerone.com/reports/3889197","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/mariadb-corporation/mariadb-connector-nodejs/releases/tag/3.2.5","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/mariadb-corporation/mariadb-connector-nodejs/releases/tag/3.3.4","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/mariadb-corporation/mariadb-connector-nodejs/releases/tag/3.4.7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/mariadb-corporation/mariadb-connector-nodejs/releases/tag/3.5.4","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://jira.mariadb.org/browse/CONJS-368","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://github.com/mariadb-corporation/mariadb-connector-nodejs","tags":["package"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-107385","tags":["web"],"sources":["bitnami"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-10-09T11:45:07.704Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-107385","url":"https://www.cve.org/CVERecord?id=CVE-2026-107385","licence":"CVE Terms of Use","modified":"2026-10-09T11:45:28.671Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r3rv-jm3r-62q2","url":"https://github.com/advisories/GHSA-r3rv-jm3r-62q2","licence":"CC-BY-4.0","modified":"2026-10-16T09:55:57.878Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-107385","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-107385","licence":"Public domain","modified":"2026-10-09T12:17:08.390Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-MARIADB-2026-107385","url":"https://osv.dev/vulnerability/BIT-MARIADB-2026-107385","licence":"Apache-2.0","modified":"2026-10-16T09:55:57.878Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-MARIADB-MIN-2026-107385","url":"https://osv.dev/vulnerability/BIT-MARIADB-MIN-2026-107385","licence":"Apache-2.0","modified":"2026-10-16T09:55:57.878Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-MYSQL-CLIENT-2026-107385","url":"https://osv.dev/vulnerability/BIT-MYSQL-CLIENT-2026-107385","licence":"Apache-2.0","modified":"2026-10-16T09:55:57.878Z"}],"updatedAt":"2026-11-25T22:59:43.213Z","epss":{"score":0.00549,"percentile":0.4734,"date":"2026-12-01T12:00:22.000Z"}}