MariaDB Connector/J: Length-encoded integers larger than Integer.MAX_VALUE were truncated before being used as lengths
Impact
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.
Source excerpt · OSVExploitation requires control of the server side of the connection; no authentication bypass, confidentiality or integrity impact.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| From 3.0.0 before 3.3.7Ecosystem versions | 3.3.7 |
| From 3.4.0 before 3.4.5Ecosystem versions | 3.4.5 |
| From 3.5.0 before 3.5.10Ecosystem versions | 3.5.10 |
Version evidence: OSV · GHSA-797x-p4mc-jwpm
View original version evidence (39 explicit versions)
Affected products
Vendor version evidence. Product records are separate from automatic dependency matching.
mariadb-corporation · GitHub_M
mariadb-connector-j
3 ranges
mariadb-corporation · GitHub_M
mariadb-connector-j
Compare with this publisher’s ranges. This does not inspect your installation.
affected
>= 3.0.0, < 3.3.7
>= 3.4.0, < 3.4.5
>= 3.5.0, < 3.5.10
Other versions: unknown
Original source 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
Inside the record
Evidence available
Describes the evidence in this view, not whether the product is safe.
Original records
CVE-2026-119279View the latest unmodified CVE JSON from the official source. It may be newer than this imported page.
cve.new JSON →Underlying weaknesses
The source’s classification of what caused the vulnerability.
Contributing organizations · 1
Assigning organization
What changed
Follow changesLarge field values are marked as truncated previews. Original source snapshots remain retained.