GHSA-4jq2-8v3c-97w8

    Dashboard / Vulnerabilities / GHSA-4jq2-8v3c-97w8

    GHSA-4jq2-8v3c-97w8

    Published: 30 Oct 2026Last Modified: 30 Oct 2026

    Summary: MariaDB Connector/J: XA recover() trusted server-supplied gtrid and bqual lengths

    Details: ## Summary `XAResource.recover()` in MariaDB Connector/J trusted the `gtrid_length` and `bqual_length` columns returned by `XA RECOVER` to allocate and split each Xid. ## Details `MariaDbPoolConnection` and `MariaDbPoolPinnedConnection` built each `Xid` of the recovery list by allocating `new byte[gtrid_length]` and `new byte[bqual_length]` and copying from the `data` column, without validating the lengths against the XA specification bounds (`Xid.MAXGTRIDSIZE`, `Xid.MAXBQUALSIZE`) or the actual payload. Negative or oversized lengths, or lengths that do not fit the data, ended in large allocations or unchecked exceptions (`NegativeArraySizeException`, `ArrayIndexOutOfBoundsException`) during recovery. The fix validates the lengths before any allocation or copy and reports an invalid row as an `XAException` (`XAER_RMFAIL`). ## Impact Availability only, and limited to applications running XA recovery: a malicious or compromised server, or a MitM, can crash the recovery or drive large allocations. Exploitation requires control of the server side of the connection. ## 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