GHSA-797x-p4mc-jwpm

    Dashboard / Vulnerabilities / GHSA-797x-p4mc-jwpm

    GHSA-797x-p4mc-jwpm

    Published: 30 Oct 2026Last Modified: 30 Oct 2026

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

    Details: ## 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 packages

    Package

    Name: org.mariadb.jdbc:mariadb-java-client

    Purl: pkg:maven/org.mariadb.jdbc/mariadb-java-client

    Affected ranges

    Type: ECOSYSTEM

    Events:

    Introduced- 3.0.0
    Fixed -3.3.7

    Affected versions

    3.0.1-beta
    3.0.10
    3.0.11
    3.0.2-rc
    3.0.3
    3.0.4
    3.0.5
    3.0.6
    3.0.7
    3.0.8
    3.0.9

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High