MODERATE 5.9

CVE-2026-119279

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

Description

Summary

MariaDB Connector/J narrowed 8-byte length-encoded integers received from the server to int without validation. A rogue or MitM server can send a value above Integer.MAX_VALUE whose truncation becomes a negative or arbitrary length.

Details

The protocol encodes lengths as length-encoded integers, whose 8-byte form the decoder (readLength() and readIntLengthEncodedNotNull()) returned as (int) readLong(). A value above Integer.MAX_VALUE therefore wrapped to a negative or unrelated int, used afterwards as a length to size allocations or reads, which ended in NegativeArraySizeException, out-of-bounds exceptions or oversized allocations.

The fix rejects any length-encoded value that does not fit a non-negative int with an explicit error.

Impact

Availability only: a malicious or compromised server, or a MitM, can crash the client's connection handling with unchecked exceptions or drive oversized allocations. Exploitation requires control of the server side of the connection; no authentication bypass, confidentiality or integrity impact.

Credit

Reported by fg0x0

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.mariadb.jdbc » mariadb-java-client
>= 3.0.0, < 3.3.7>= 3.4.0, < 3.4.5>= 3.5.0, < 3.5.10
3.3.7, 3.4.5, 3.5.10

Blast radius

1affected artifacts
50affected versions
1,079dependent artifacts (est.)
33,821dependent versions

65% of the dependent artifacts (702) still pull an affected version in their latest release.

DepthDependent versions
Direct
10,589
2 hops
12,982
3 hops
6,274
4 hops
1,602
5 hops
2,003
6 hops
371

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.