MariaDB Connector/J: Rogue server can drive large heap allocations from server-declared lengths in OK packets
CVE-2026-119276
Summary 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. Details When CLIENTSESSIONTRACK 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…
Assessment
- CVSS
- 5.9 (v3.1)
- Severity
- Medium
- EPSS
- 0.00351% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 30 October 2026
- Last updated
- 30 October 2026
- Affected
- maven · org.mariadb.jdbc:mariadb-java-client
- Weakness
- CWE-130, CWE-789
CVSS vectorCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
At the source
References
- https://github.com/mariadb-corporation/mariadb-connector-j/security/advisories/GHSA-h599-m3w5-9m7x
- https://nvd.nist.gov/vuln/detail/CVE-2026-119276
- https://github.com/mariadb-corporation/mariadb-connector-j/commit/b9e1ee8d9b4d820d70719504cdfd5c97f1aede5f
- https://github.com/mariadb-corporation/mariadb-connector-j/commit/beb445fcf9294113878fc05ac77f0efdf0596ac6
- https://github.com/mariadb-corporation/mariadb-connector-j/commit/ea8c7b6537e50053444188a9a3fd9cae99550f56
- https://github.com/mariadb-corporation/mariadb-connector-j/releases/tag/3.3.7
- https://github.com/mariadb-corporation/mariadb-connector-j/releases/tag/3.4.5
- https://github.com/mariadb-corporation/mariadb-connector-j/releases/tag/3.5.11
- https://github.com/advisories/GHSA-h599-m3w5-9m7x
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-119276