Skip to main content

MariaDB Connector/R2DBC CVE-2026-55859

MEDIUM
Improper Encoding or Escaping of Output (CWE-116)
2026-08-28 GitHub_M GHSA-5rqc-86vf-g8r2
5.9
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Control or spoof database server
  2. Delivery
    Send OK-packet with non-UTF-8 character_set_client change
  3. Exploit
    Driver continues writing UTF-8 bytes post-charset shift
  4. Execution
    Server interprets bytes under mismatched multi-byte encoding
  5. Persist
    Byte-wise escaping assumption violated
  6. Impact
    Inject SQL or silently corrupt stored character data

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding for downstream
Exploitation Conditions

Exploitation requires one of three server-side triggering conditions: (1) a hostile or man-in-the-middle server that injects a forged OK-packet containing a character_set_client session-state change to a non-UTF-8 charset (e.g., GBK, BIG5, latin1) after the connection initialization phase completes; (2) a stored routine or trigger on the MariaDB/MySQL server that executes SET NAMES with a non-UTF-8 charset during a session; or (3) server configuration that alters character_set_client mid-session via session-state-tracking. The application must use org.mariadb:r2dbc-mariadb below 1.4.1. For the SQL injection sub-impact to be realized, the application must additionally rely on driver-level string escaping rather than exclusively using parameterized prepared statements. Factors that limit exploitation: the CVSS AC:H rating reflects that the attacker cannot trigger the charset change from the client side alone - server-side access, stored procedure control, or MitM positioning is required; TLS-encrypted database connections prevent the network MitM scenario; and applications using parameterized queries exclusively are not exposed to the SQL injection pathway, though data corruption risk persists regardless of query style.

Impact

The CVSS 5.9 (AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N) accurately reflects the exploitation profile: network-accessible attack vector, high attack complexity due to the requirement for server-side control or man-in-the-middle positioning, no required client privileges, and high integrity impact without confidentiality or availability impact. The high complexity (AC:H) is the key limiting factor - exploitation requires either controlling a database server the client connects to, positioning as a network MitM on the database connection, or leveraging existing server-side stored procedures, triggers, or configuration that execute SET NAMES to a non-UTF-8 charset. No EPSS score was provided in the input data, so exploitation probability cannot be numerically quantified. No CISA KEV listing exists, and no public exploit code has been identified. The SQL injection sub-impact is conditional: applications that rely exclusively on parameterized queries (prepared statements) are largely unaffected by the SQL injection vector, though silent data corruption remains a risk for any affected application. TLS-encrypted database connections substantially reduce the man-in-the-middle scenario. The real-world priority is moderate - highest for applications with shared or externally-controllable database servers, lowest for isolated, single-tenant deployments using parameterized queries throughout. EPSS data absence is noted; exploitation likelihood cannot be confirmed from available signals.

Exploit ScenarioDerived

An attacker who controls a MariaDB server - or is positioned as a man-in-the-middle on an unencrypted database connection - responds to the client's initial connection with a valid handshake, then later sends an OK-packet embedding a session-state-tracking entry that changes character_set_client to GBK or BIG5. The Java driver continues encoding user-supplied strings as UTF-8 while the server interprets those bytes under GBK, breaking the byte boundary assumptions of the driver's escape logic; a carefully crafted string can now include bytes that the server treats as the second byte of a multi-byte sequence, causing a preceding backslash or quote to be consumed, effectively escaping the escaping and injecting arbitrary SQL. No public exploit code has been identified, but the charset-confusion SQL injection technique against GBK and similar encodings is well-documented in the security literature.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 28, 2026

MariaDB Connector/R2DBC prior to 1.4.1 hardcodes UTF-8 for all character encoding and decoding but fails to reject mid-session charset changes announced by the server via the OK-packet session-state-tracking mechanism. A hostile or man-in-the-middle server, or server-side constructs such as stored routines, triggers, or server configuration, can shift character_set_client to a non-UTF-8 encoding after connection initialization, causing the driver and server to interpret identical bytes under different encodings. This produces silent data corruption and a charset-confusion mismatch that can undermine byte-wise quoting and escaping, creating a pathway to SQL injection in applications that rely on driver-level escaping; no public exploit has been identified at time of analysis and the vendor-released patch is available in version 1.4.1.

RemediationAI

Vendor-released patch: 1.4.1. Upgrade org.mariadb:r2dbc-mariadb to version 1.4.1 or later, available at https://github.com/mariadb-corporation/mariadb-connector-r2dbc/releases/tag/1.4.1; the fixing commit is documented at https://github.com/mariadb-corporation/mariadb-connector-r2dbc/commit/38bad9afebc6c581a853656a42f9ebf403b1b1b7. The vendor explicitly states there is no reliable application-level workaround - the fix must be applied at the driver level. As partial mitigation until upgrade is feasible, restrict the database user account's SUPER and FILE privileges to prevent execution of SET NAMES via stored routines or direct session commands, noting this does not prevent server-configuration-driven charset changes and may break stored procedure functionality. Enforcing TLS for all database connections (using requireSSL or verifyServerCertificate in the connection URL) significantly reduces the man-in-the-middle attack scenario, with the trade-off of added TLS overhead. Applications using exclusively parameterized queries (never string-interpolated SQL) are protected from the SQL injection sub-impact but remain exposed to silent data corruption until patched.

Affected Packages

maven org.mariadb:r2dbc-mariadb fix: 1.4.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in maven

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

MariaDB Connector/R2DBC (org.mariadb:r2dbc-mariadb) is a non-blocking, reactive Java client for MariaDB and MySQL databases built on the R2DBC SPI, typically used in Spring WebFlux stacks. The vulnerability is classified under CWE-116 (Improper Encoding or Escaping of Output): the driver unconditionally encodes all outbound character data as UTF-8 and decodes all inbound data as UTF-8, without tracking or validating server-initiated character set changes. The MariaDB wire protocol's OK-packet session-state-tracking mechanism allows the server to embed session variable changes - including character_set_client - inside routine response packets. The pre-1.4.1 driver parsed these notifications but applied no post-initialization guard. The fix introduces an initialized flag (SimpleContext.setInitialized()) set after connection setup completes, and a setCharset() method in the Context interface that throws R2dbcNonTransientResourceException (SQLState 08000) and closes the connection if any subsequent OK-packet announces a charset other than utf8, utf8mb3, or utf8mb4. Affected CPEs are cpe:2.3:a:mariadb-corporation:mariadb-connector-r2dbc:*:*:*:*:*:*:*:* and cpe:2.3:a:org.mariadb:r2dbc-mariadb:*:*:*:*:*:*:*:*, covering all versions below 1.4.1.

Know when Mariadb Connector R2Dbc gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
vuln.today AI 5.9 MEDIUM

Server-side control or MitM required (AC:H); client needs no privileges (PR:N); impact is integrity-only via encoding confusion, with no confidentiality or availability effect.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

DescriptionCVE.org

MariaDB Connector/R2DBC is a non-blocking MariaDB and MySQL client implemented in Java. Prior to 1.4.1, org.mariadb:r2dbc-mariadb encodes and decodes all character data under the assumption that the connection character set is UTF-8. A server can announce a mid-session change to character_set_client through the OK-packet session-state-tracking mechanism, including through SET NAMES executed by a stored routine or trigger, server configuration, or a hostile or man-in-the-middle server. If the new character set is not UTF-8, the driver continues to exchange UTF-8 while the server interprets the same bytes under a different encoding, causing silent data corruption and a client/server charset-confusion mismatch that can defeat byte-wise quoting or escaping. The fix accepts only utf8, utf8mb3, or utf8mb4 after initialization; any other value raises R2dbcNonTransientResourceException with SQLState 08000 and closes the connection. This issue is fixed in version 1.4.1.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 3 maven packages depend on org.mariadb:r2dbc-mariadb (3 direct, 0 indirect)

Ecosystem-wide dependent count for version 1.4.1.

Threat Intelligence Overview

EPSS Score
0.2%
Top 86% exploitable
Prevalence
Medium
reactive Java DB driver used in Spring WebFlux/R2DBC stacks
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Affected Products (CPE)CVE.org

cpe:2.3:a:mariadb-corporation:mariadb-connector-r2dbc:*:*:*:*:*:*:*:*
cpe:2.3:a:org.mariadb:r2dbc-mariadb:*:*:*:*:*:*:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy