Several MariaDB geometry functions read four bytes from a heap buffer without checking that the buffer contains four bytes, so a short crafted WKB hex literal in a SELECT returns adjacent heap memory as an integer. An authenticated user can therefore disclose up to four bytes of heap memory per query, and on ASAN builds the same query crashes the server.
Several MariaDB command-line utilities build SQL queries from database-supplied names without escaping them, so a malicious database can make the client run injected SQL. The dump tool also has an infinite loop and buffer overflows that can crash the client.
A logic flaw in the TLS auth-switch guard of MariaDB Connector/C allows a man-in-the-middle attacker to capture the client's plaintext database password. When only hostname verification fails, the bitmask check is bypassed, letting the attacker switch to a cleartext auth plugin and receive the password before the connection is rejected.
The GSSAPI client authentication plugin copies a server-supplied service principal name into a fixed 256-byte stack buffer with strncpy, which does not NUL-terminate when the source fills the buffer, so a later strlen reads past the buffer. A second flaw reads one byte past the packet when the packet contains no NUL byte, and a malicious server could trigger a stack out-of-bounds read or crash the client.
A failed parameter-array execute in the MariaDB ODBC connector leaves an internal array offset stale because an exception skips the only reset point, so the next batch on the same handle reads past the application's parameter arrays. This causes either a crash or silently dropped rows in a batch the application believes succeeded.
The ODBC driver's SqlwcsOctetLen function sizes UTF-16 strings using a byte-oriented helper that misinterprets characters whose low byte is 0xD8-0xDB as surrogate leads, causing an out-of-bounds read past the caller's buffer. The inflated length is passed to iconv, so adjacent client memory is converted and sent to the database server as part of the SQL statement.
The r2dbc-mariadb driver accepts a server packet that arrives when no command is outstanding, buffers it, and delivers it to the next unrelated statement because responses are never correlated with requests and the sequence id is not validated. An attacker able to inject bytes into the TCP stream can permanently desynchronise a pooled connection so that one application user receives another user's rows and a write matching no rows is reported as having matched one.
The MariaDB Connector/ODBC driver builds positioned DELETE and UPDATE statements by appending the column name from result-set metadata without any quoting, while the value is properly escaped. An attacker who controls a column or table name can inject SQL that runs on the application's connection, for example turning a single-row delete into a delete of every row.
Two functions in MariaDB Connector/ODBC clear the error record using the statement-handle macro on a descriptor handle, so the driver writes past the end of a smaller descriptor object on every call. With a malicious or man-in-the-middle server, bytes from the server version string are used as the offset for a second write, giving a remotely influenced zero-byte write and a crash.
Nine of the ten ODBC catalog functions in MariaDB Connector/ODBC copy an application-supplied identifier into a fixed 513-byte stack buffer without checking its length, so a name longer than 256 bytes overflows it with attacker-controlled bytes. An attacker who can get a calling application to pass a long identifier into a catalog lookup can crash the process, and on builds without a stack canary can overwrite the saved return address.
The MariaDB Connector/C++ driver hardcodes the multi-statement client flag when connecting, so stacked statements are accepted even when allowMultiQueries is false. Separately, savepoint names are concatenated into SQL without quoting, letting a crafted name run arbitrary statements.
The Connector/C++ driver reads the session-tracking system-variable name from an OK packet, compares it to a literal, then calls std::stoi on that same name string, which always throws std::invalid_argument. Because that exception type is not caught by the driver or by applications catching sql::SQLException, a malicious or MITM-positioned server can abort the client process with two packets.
The Connector/C++ string escaper's internal replace helper re-scans its own inserted output, so backslash doubling produces an odd run of escape characters that swallows the closing quote of a SQL literal. An attacker who controls a table, schema or column name passed to a DatabaseMetaData method could break out of the literal and inject SQL, reading rows and schemas the caller did not request.
A stack buffer overflow exists in MariaDB's CONNECT storage engine when reading DOUBLE columns from TABLE_TYPE=DOS tables, because the NUL terminator is written at an unclamped index. An attacker could crash the MariaDB server, causing a denial of service.
The ODBC driver builds an error-message prefix from the server-supplied version string using a custom snprintf that returns a negative value on truncation; adding that negative to an unsigned size_t length wraps it to a huge value. A malicious or man-in-the-middle server sending a very long version string therefore causes an out-of-bounds heap write in the client when a statement is allocated, demonstrated as a crash.
MariaDB Connector/C++ allocates result-column buffers using the column length declared at PREPARE time, but then trusts the per-row field length reported by the server without clamping it to the buffer size. A malicious or man-in-the-middle server that declares a small column but sends a larger field value causes a heap out-of-bounds read, leaking adjacent process memory into application-visible column values and crashing the client.
The Parsec authentication plugin in the r2dbc-mariadb driver took a PBKDF2 iteration exponent directly from the server's handshake reply and only capped it at 20, so a malicious or man-in-the-middle server could force roughly a billion hashing rounds per connection. This pinned a client CPU core for around 25 minutes per attempt, and with a retrying connection pool it could exhaust the whole application's CPU.
The MariaDB WKB, WKT and GeoJSON geometry-collection parsers recurse once per nested child without any depth limit or stack-overrun check. A low-privileged user who can call a spatial function or store a GEOMETRY value can send a deeply nested value that exhausts the thread stack and crashes the whole server.
HandlerSocket, an optional MariaDB plugin, allocates stack memory based on a client-supplied field count before validating that the count is within the index's allowed field limit. An attacker who can reach the HandlerSocket port can send an abnormally large field count and crash the mariadbd process, making the database unavailable.
MariaDB's SFORMAT() function accepts an extremely large width value, causing the server to allocate close to 2 GB of memory before returning any result. A low-privilege user can send several concurrent such queries to exhaust memory and crash the database service.
DROP PACKAGE removes the package and package body rows from mysql.proc but leaves the PACKAGE BODY grant in mysql.procs_priv. A user who held that grant can execute a later package created under the same name, running with the new definer's privileges and reading data they cannot otherwise access.
The caching_sha2_password server plugin decrypts the client's RSA password reply and subtracts one from the resulting length without checking for an empty plaintext, so a zero-length message underflows a size_t to SIZE_MAX. An unauthenticated attacker can send an RSA-OAEP encryption of an empty message to trigger an out-of-bounds read and crash the whole server.
A user with only schema-level privileges could abuse the DATA DIRECTORY and INDEX DIRECTORY table options to write files outside the intended data directory, including into restricted locations, by exploiting path traversal and filename length issues. This could allow writing almost arbitrary content to attacker-chosen files, potentially leading to code execution or data leakage.
Several SHOW CREATE and SHOW GRANTS statements in MariaDB emit SQL built from stored metadata without escaping it, and mariadb-dump has similar gaps in its generated output. An attacker who controls a database could plant crafted identifiers or literals so that a privileged user who dumps and re-imports that database runs the attacker's SQL with elevated privileges.
View and procedure definers are stored as raw option strings, so a username or role containing newline characters can inject extra definer options such as a different host or the suid flag. An attacker who controls their own username or role name could then run SQL with the privileges of another account, including reading the global privilege table.
MariaDB's special handling of table names prefixed with #mysql50# skips the normal filename encoding, so an attacker can create table names containing characters such as # and newlines that collide with internal storage-engine files. This allows hidden tables, memory-corruption leading to remote code execution, and a merge-table trick that reads another database's table despite missing permissions.
MariaDB treats a table name and its legacy #mysql50# alias as separate identities in the SQL, metadata and cache layers even though both map to the same on-disk files. A low-privileged schema owner can open a table under one spelling and reshape it under the other, leaving stale table and field metadata that is later applied to attacker-controlled data, which the report chains into memory disclosure, privilege escalation and code execution.
Two memory-safety bugs in MariaDB are chained: a use-after-free in the SYS_REFCURSOR cursor array and an out-of-bounds heap read in ST_Area. Together they let a low-privilege authenticated user leak addresses and then run arbitrary OS commands as the mariadbd process user.
A stored procedure cursor object holds pointers into a dynamic array of statement cursors; when a function called during the cursor's query opens enough additional cursors, the array reallocates and those pointers dangle. An authenticated user with CREATE FUNCTION privilege could then trigger a use-after-free that crashes the server and, in the author's view, may allow code execution through a virtual call on freed memory.
MA
MariaDB
High
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.