CVE-2026-119276

MariaDB Connector/J: Rogue server can drive large heap allocations from server-declared lengths in OK packets

Published Oct 29, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability allows a server that speaks the CLIENT_SESSION_TRACK protocol to instruct the Java client to allocate memory using lengths declared in OK packets before bounds checking. By sending a packet with an oversized length, an attacker can force repeated large heap allocations, causing excessive garbage‑collection pressure or an OutOfMemoryError that halts or crashes the client application, effectively denying service. The weakness is a classic unchecked allocation and resource exhaustion, denoted by CWE-130 and CWE-789.

Affected Systems

MariaDB Connector/J versions 3.0.0 up to and including 3.3.6, 3.4.4, and 3.5.10 are vulnerable. The issue is fixed in releases 3.3.7, 3.4.5, and 3.5.11 and later. The product is the Java connector shipped by MariaDB Corporation.

Risk and Exploitability

The CVSS score of 5.9 indicates moderate severity. No EPSS value is available and the vulnerability is not listed in CISA's KEV catalog. An attacker must be able to send forged OK packets, which requires control of the database server or a man‑in‑the‑middle position on the network path. While an active exploit has not been reported, vulnerable clients could be turned into denial‑of‑service targets if exposed to untrusted servers. The risk is therefore moderate but can be high in environments that connect to unverified database endpoints.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade MariaDB Connector/J to version 3.3.7, 3.4.5, 3.5.11 or later where the issue is fixed
  • If an immediate upgrade is not possible, disable CLIENT_SESSION_TRACK by configuring the connector not to request session tracking from the server
  • Deploy network security controls to detect anomalous OK packet lengths and restrict connections to trusted database endpoints
  • Monitor application memory usage to detect excessive garbage‑collection or OOM events that could indicate malicious packets

Generated by OpenCVE AI on October 29, 2026 at 22:31 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-h599-m3w5-9m7x MariaDB Connector/J: Rogue server can drive large heap allocations from server-declared lengths in OK packets
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Mariadb
Mariadb mariadb-connector-j
Mariadb-corporation
Mariadb-corporation mariadb-connector-j
Vendors & Products Mariadb
Mariadb mariadb-connector-j
Mariadb-corporation
Mariadb-corporation mariadb-connector-j
Type Values Removed Values Added
Description 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.
Title MariaDB Connector/J: Rogue server can drive large heap allocations from server-declared lengths in OK packets
Weaknesses CWE-130
CWE-789
References
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses
  • CWE-130

    Improper Handling of Length Parameter Inconsistency

  • CWE-789

    Memory Allocation with Excessive Size Value

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 30, 2026, 5:11 PM
Reserved
Oct 29, 2026, 6:50 PM
Status
Awaiting Analysis
Published
Oct 29, 2026, 9:17 PM
Modified
Oct 30, 2026, 5:18 PM
Severity
Moderate
Public date
Oct 29, 2026, 8:47 PM