GHSA-H599-M3W5-9M7X
Vulnerability from github – Published: 2026-10-30 23:00 – Updated: 2026-10-30 23:00Summary
MariaDB Connector/J sized heap allocations from lengths declared by the server in OK packets before checking that those lengths fit in the packet. A rogue or MitM server can make the client allocate megabytes from a packet of a few bytes.
Details
When CLIENT_SESSION_TRACK is negotiated (the default), an OK packet carries an
info field followed by session-state blocks, each tracked variable being sent as a
length-encoded name and value. OkPacket.parse() and parseWithInfo() allocated
new byte[len] for the info field, the variable name and the value with the
server-declared len, then copied the packet data into it. The copy failed with an
ArrayIndexOutOfBoundsException when the packet was shorter, but only after the
allocation had taken place.
A server-declared length of 8 MiB in an 18-byte packet was enough to trigger an 8 MiB allocation; the integer-range validation of length-encoded values does not help, since such lengths are valid positive integers.
The fix validates every server-declared length against the remaining packet bytes
before any allocation (ReadableByteBuf.checkLength() and a bounded
readBytes(int)), and stops reading the session state at the first inconsistent
entry.
Impact
Availability only: a malicious or compromised server, or a MitM, can drive
attacker-controlled heap allocations on every OK packet, creating GC pressure up to
OutOfMemoryError in the client application. Exploitation requires control of the
server side of the connection; no authentication bypass, confidentiality or
integrity impact.
Credit
Reported by fg0x0
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.mariadb.jdbc:mariadb-java-client"
},
"ranges": [
{
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.3.7"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.mariadb.jdbc:mariadb-java-client"
},
"ranges": [
{
"events": [
{
"introduced": "3.4.0"
},
{
"fixed": "3.4.5"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.mariadb.jdbc:mariadb-java-client"
},
"ranges": [
{
"events": [
{
"introduced": "3.5.0"
},
{
"fixed": "3.5.11"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-119276"
],
"database_specific": {
"cwe_ids": [
"CWE-130",
"CWE-789"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-30T23:00:12Z",
"nvd_published_at": "2026-10-29T21:17:20Z",
"severity": "MODERATE"
},
"details": "## Summary\n\nMariaDB Connector/J sized heap allocations from lengths declared by the server\nin OK packets before checking that those lengths fit in the packet. A rogue or\nMitM server can make the client allocate megabytes from a packet of a few bytes.\n\n## Details\n\nWhen `CLIENT_SESSION_TRACK` is negotiated (the default), an OK packet carries an\ninfo field followed by session-state blocks, each tracked variable being sent as a\nlength-encoded name and value. `OkPacket.parse()` and `parseWithInfo()` allocated\n`new byte[len]` for the info field, the variable name and the value with the\nserver-declared `len`, then copied the packet data into it. The copy failed with an\n`ArrayIndexOutOfBoundsException` when the packet was shorter, but only after the\nallocation had taken place.\n\nA server-declared length of 8 MiB in an 18-byte packet was enough to trigger an\n8 MiB allocation; the integer-range validation of length-encoded values does not\nhelp, since such lengths are valid positive integers.\n\nThe fix validates every server-declared length against the remaining packet bytes\nbefore any allocation (`ReadableByteBuf.checkLength()` and a bounded\n`readBytes(int)`), and stops reading the session state at the first inconsistent\nentry.\n\n## Impact\n\nAvailability only: a malicious or compromised server, or a MitM, can drive\nattacker-controlled heap allocations on every OK packet, creating GC pressure up to\n`OutOfMemoryError` in the client application. Exploitation requires control of the\nserver side of the connection; no authentication bypass, confidentiality or\nintegrity impact.\n\n## Credit\n\nReported by fg0x0",
"id": "GHSA-h599-m3w5-9m7x",
"modified": "2026-10-30T23:00:12Z",
"published": "2026-10-30T23:00:12Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/mariadb-corporation/mariadb-connector-j/security/advisories/GHSA-h599-m3w5-9m7x"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-119276"
},
{
"type": "WEB",
"url": "https://github.com/mariadb-corporation/mariadb-connector-j/commit/b9e1ee8d9b4d820d70719504cdfd5c97f1aede5f"
},
{
"type": "WEB",
"url": "https://github.com/mariadb-corporation/mariadb-connector-j/commit/beb445fcf9294113878fc05ac77f0efdf0596ac6"
},
{
"type": "WEB",
"url": "https://github.com/mariadb-corporation/mariadb-connector-j/commit/ea8c7b6537e50053444188a9a3fd9cae99550f56"
},
{
"type": "PACKAGE",
"url": "https://github.com/mariadb-corporation/mariadb-connector-j"
},
{
"type": "WEB",
"url": "https://github.com/mariadb-corporation/mariadb-connector-j/releases/tag/3.3.7"
},
{
"type": "WEB",
"url": "https://github.com/mariadb-corporation/mariadb-connector-j/releases/tag/3.4.5"
},
{
"type": "WEB",
"url": "https://github.com/mariadb-corporation/mariadb-connector-j/releases/tag/3.5.11"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "MariaDB Connector/J: Rogue server can drive large heap allocations from server-declared lengths in OK packets"
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.