CVE-2026-119276Medium· 5.9▾ SunlitMariaDB Connector/J: Rogue server can drive large heap allocations from server-declared lengths in OK packets
▾ Sunlit zone — Low / medium · no exploitation signal
impact 32.5 · likelihood 0.1 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via GHSA
0.4%
MariaDB Connector/J sized heap allocations from lengths declared by the server in OK packets before checking that those lengths fit in the packet. A rogue or MitM server can make the client allocate megabytes from a packet of a few bytes.
When CLIENT_SESSION_TRACK is negotiated (the default), an OK packet carries an
info field followed by session-state blocks, each tracked variable being sent as a
length-encoded name and value. OkPacket.parse() and parseWithInfo() allocated
new byte[len] for the info field, the variable name and the value with the
server-declared len, then copied the packet data into it. The copy failed with an
ArrayIndexOutOfBoundsException when the packet was shorter, but only after the
allocation had taken place.
A server-declared length of 8 MiB in an 18-byte packet was enough to trigger an 8 MiB allocation; the integer-range validation of length-encoded values does not help, since such lengths are valid positive integers.
The fix validates every server-declared length against the remaining packet bytes
before any allocation (ReadableByteBuf.checkLength() and a bounded
readBytes(int)), and stops reading the session state at the first inconsistent
entry.
Availability only: a malicious or compromised server, or a MitM, can drive
attacker-controlled heap allocations on every OK packet, creating GC pressure up to
OutOfMemoryError in the client application. Exploitation requires control of the
server side of the connection; no authentication bypass, confidentiality or
integrity impact.
Reported by fg0x0
org.mariadb.jdbc:mariadb-java-client >= 3.0.0, < 3.3.7org.mariadb.jdbc:mariadb-java-client >= 3.4.0, < 3.4.5org.mariadb.jdbc:mariadb-java-client >= 3.5.0, < 3.5.11Upgrade to a patched release:
org.mariadb.jdbc:mariadb-java-client 3.3.7org.mariadb.jdbc:mariadb-java-client 3.4.5org.mariadb.jdbc:mariadb-java-client 3.5.11Connected by shared product, vendor, weakness, or advisory.
CVE-2026-119280Low· 3.7MariaDB Connector/J: XA recover() trusted server-supplied gtrid and bqual lengths
CVE-2026-119281Medium· 5.9MariaDB Connector/J: Server could switch character_set_results away from UTF-8 without the client noticing
CVE-2026-119279Medium· 5.9MariaDB Connector/J: Length-encoded integers larger than Integer.MAX_VALUE were truncated before being used as lengths
CVE-2026-119210Medium· 5.9MariaDB Connector/J: LOAD DATA LOCAL INFILE file check could be satisfied by text inside quoted identifiers, letting a malicious server read client files
CVE-2026-55856Medium· 5.9MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases
CVE-2026-55857Medium· 5.9MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases