CVE-2026-119279

MariaDB Connector/J: Length-encoded integers larger than Integer.MAX_VALUE were truncated before being used as lengths

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.10, the ReadableByteBuf.readLength() and ReadableByteBuf.readIntLengthEncodedNotNull() methods narrowed the protocol's unsigned 8-byte length-encoded integer to a Java int without checking that the value fit a non-negative integer. Values above Integer.MAX_VALUE could wrap to a negative or unrelated length that downstream allocation and read paths used. A malicious or compromised server, or a machine-in-the-middle attacker, could trigger NegativeArraySizeException, out-of-bounds failures, or oversized allocation behavior in client connection handling. This issue is fixed in versions 3.3.7, 3.4.5, and 3.5.10.

Analysis

AI-generated

Technical impact

The vulnerability stems from the MariaDB Connector/J driver truncating protocol unsigned 8‑byte length‑encoded integers to a Java int without ensuring the value fits a non‑negative bound. When a length greater than Integer.MAX_VALUE is received, the truncation can produce a negative or unexpectedly large value that downstream allocation and read logic uses. This can trigger NegativeArraySizeException, out‑of‑bounds read or write failures, or cause the client to allocate an oversized buffer, leading to crashes or resource exhaustion and thereby denying service to an application that relies on the driver.

Affected Systems

MariaDB Connector/J, specifically the Java driver used to connect applications to MariaDB or MySQL databases. Versions from 3.0.0 up to, but not including, the fixed releases 3.3.7, 3.4.5, and 3.5.10 are vulnerable. Any Java application that incorporates these older driver jars is potentially affected.

Risk and Exploitability

With a CVSS score of 5.9 the flaw is considered moderate in severity. The EPSS score is below 1% and the vulnerability is not currently listed in the CISA KEV catalog, suggesting limited known exploitation. The likely attack vector is a malicious or compromised database server or a man‑in‑the‑middle attacker that can send a crafted packet to the client. If such an attacker succeeds, the client can experience crashes or memory exhaustion, interrupting service availability.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade MariaDB Connector/J to version 3.3.7 or newer (3.4.5/3.5.10).
  • Replace the MariaDB Connector/J driver jar in all affected Java applications with the updated connector.
  • If an upgrade cannot be performed immediately, monitor application logs for NegativeArraySizeException or out-of-bounds errors, and isolate or block affected database connections to prevent service disruption.

Generated by OpenCVE AI on November 2, 2026 at 13:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-797x-p4mc-jwpm MariaDB Connector/J: Length-encoded integers larger than Integer.MAX_VALUE were truncated before being used as lengths
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.10, the ReadableByteBuf.readLength() and ReadableByteBuf.readIntLengthEncodedNotNull() methods narrowed the protocol's unsigned 8-byte length-encoded integer to a Java int without checking that the value fit a non-negative integer. Values above Integer.MAX_VALUE could wrap to a negative or unrelated length that downstream allocation and read paths used. A malicious or compromised server, or a machine-in-the-middle attacker, could trigger NegativeArraySizeException, out-of-bounds failures, or oversized allocation behavior in client connection handling. This issue is fixed in versions 3.3.7, 3.4.5, and 3.5.10.
Title MariaDB Connector/J: Length-encoded integers larger than Integer.MAX_VALUE were truncated before being used as lengths
Weaknesses CWE-130
CWE-190
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-190

    Integer Overflow or Wraparound

  • CWE-681

    Incorrect Conversion between Numeric Types

Sources

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