---
id: "CVE-2026-119276"
kind: "vulnerability"
aliases: ["CVE-2026-119276"]
title: "MariaDB Connector/J: malformed server packet forces memory exhaustion in Java clients"
severity: "medium"
cvss: 5.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["java", "jdbc", "mariadb-connector-j", "mysql", "package"]
not_affected_if: ["not-using-connector-j", "trusted-database-network"]
published_at: "2026-10-29T21:17:20+00:00"
first_seen_at: "2026-10-29T21:26:51+00:00"
updated_at: "2026-10-29T21:28:50+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-119276", "first_seen_at": "2026-10-29T21:26:51+00:00"}]
---

# MariaDB Connector/J: malformed server packet forces memory exhaustion in Java clients

MariaDB Connector/J, the Java driver for MariaDB and MySQL, trusts length fields in OK packets before checking the bytes exist when session tracking is on. A malicious server or man-in-the-middle can make the client allocate large amounts of memory, causing garbage-collection pressure or an OutOfMemoryError in the application.

_Summary, check and fix written by a model from the sources; labelled as such._

## Fix

- `mariadb-java-client` 3.3.7
- `mariadb-java-client` 3.4.5
- `mariadb-java-client` 3.5.11

## Timeline

- 2026-10-29T21:26:51+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-119276

## From the sources

MariaDB Connector/J is used to connect applications developed in Java to MariaDB and MySQL databases. From 3.0.0 until 3.3.7, 3.4.5, and 3.5.11, when CLIENT_SESSION_TRACK was negotiated, the OkPacket.parse() and OkPacket.parseWithInfo() paths allocated byte arrays using server-declared lengths for the OK packet info field and session-state variable names and values before confirming that the bytes remained in the packet. A malicious or compromised server, or a machine-in-the-middle attacker, could send a small OK packet declaring a much larger length and repeatedly force attacker-controlled heap allocations before the subsequent copy failed. This could create garbage-collection pressure or an OutOfMemoryError in the client application. This issue is fixed in versions 3.3.7, 3.4.5, and 3.5.11.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
