# Vitess v24.0.6

2026-12-02 · [Original release notes](https://github.com/vitessio/vitess/releases/tag/v24.0.6) · [Full summary](https://ratatosk.io/en/releases/vitess/v24.0.6)

Security 18 · Breaking changes 1 · Important fixes 2 · Enhancements 2 · Other changes 2

## Check before upgrading

### Prerequisites

- **ZooKeeper ACL setup for digest authentication**: Pre-upgrade znodes retain `world:anyone` ACLs. The recorded procedure authenticates with `addauth digest <user>:<password>` and sets `auth::cdrwa` recursively on the common parent of the global and cell roots; first-time setup sets the auth file on all components before upgrading any, or restarts them all with it in one rollout.
  > - Znodes created before the upgrade keep their `world:anyone` ACLs. Once every component runs this release with the auth file, run `addauth digest <user>:<password>` in `zkCli.sh`, then `setAcl -R <parent> auth::cdrwa` on the common parent of the global and cell roots (for example `/vitess`), in each ZooKeeper ensemble. Credential rotation and first-time setup are described in [#22231](https://github.com/vitessio/vitess/pull/22231).
- **Existing table bindings persist across upgrades**: MERGE and FEDERATED tables on shard primaries retain their `UNION` or `CONNECTION` bindings. Past `EXCHANGE PARTITION` operations leave no trace except in a binary or audit log.
  > - Upgrading doesn't undo bindings made before it. Find MERGE and FEDERATED tables on each shard's primary with `SELECT table_schema, table_name, engine FROM information_schema.tables WHERE engine IN ('MRG_MYISAM', 'FEDERATED')`, check each one's `UNION` list or `CONNECTION` string with `SHOW CREATE TABLE`, and drop any binding that isn't intended. A past `EXCHANGE PARTITION` leaves no such trace; only the binary log or an audit log shows it.

### Known issues

- **Parser may deny partition-maintenance and `SERIAL` statements**: These statements can be denied when the parser does not fully parse them. The note lists one partition per statement, an exempt user, or spelling out the `SERIAL` type as alternatives.
  > - Partition maintenance that the parser doesn't fully parse is denied for non-exempt callers, such as `ADD PARTITION` with more than one partition definition, or `ADD PARTITION PARTITIONS n`. Add one partition per statement, or run the job as the exempt user. A failing job may only show up later, as inserts that fail past a RANGE table's last bound.
  > - On this release the parser also has no `SERIAL` column type, so an `ALTER TABLE` that defines a `SERIAL` column is denied as well. Spell the type out (`BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE`).

## Security (18)

### mTLS client authorization checks verified leaf subjects

- Affects: Processes using `--grpc-auth-mode=mtls`
- Additional action: Non-empty allowed-substring entries matching each client certificate's subject in Go's formatting
- [GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)

Previously, a client could be admitted by appending a self-signed certificate with an allowed subject, even though it was not verified against `--grpc-ca`. After the upgrade, an unset or empty entry prevents an mTLS process from starting, while a client matching only through a non-leaf certificate can receive `client certificate not authorized` (`Unauthenticated`) on RPCs; the server does not log that error.

> ### gRPC mTLS authorization checks only the verified client certificate
> With `--grpc-auth-mode=mtls`, `--grpc-auth-mtls-allowed-substrings` was matched against every certificate the client presented, not just the one verified against `--grpc-ca`. A client with any certificate from that CA could append a self-signed certificate with an allowed subject and be admitted ([GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)). The flag is now matched only against the subject of the verified leaf certificate. In mtls mode the flag can also no longer have an empty entry, which matched every subject: an unset or empty value (the default), or a leading, trailing or repeated colon, such as in `CN=vtctld:`.
> #### Impact
> - A process started with `--grpc-auth-mode=mtls` logs `Failed to load auth plugin` and exits with status 1 if `--grpc-auth-mtls-allowed-substrings` has an empty entry.
> - An entry that matches only a non-leaf certificate, such as an intermediate CA's subject, no longer admits the client. RPCs between components, such as VTGate, VTOrc or vtctld calling an upgraded VTTablet, can fail with `client certificate not authorized` (gRPC code `Unauthenticated`), which the server doesn't log.
> - Before upgrading, set the flag to non-empty entries, and check that each client certificate's subject, as Go formats it (`CN=vtctld,OU=Vitess,O=Example,C=US`), contains one of them.
> See [#22234](https://github.com/vitessio/vitess/pull/22234) for details.

### mTLS authorization restricted to the verified leaf certificate

- Affects: processes using `--grpc-auth-mode=mtls`
- Additional action: Before upgrading, set `--grpc-auth-mtls-allowed-substrings` to non-empty entries, and ensure each client certificate's subject, as Go formats it, contains one of them.
- [GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)

Previously, the allowed-substring check could match an appended self-signed or other non-leaf certificate, admitting a client even when its verified leaf did not match. Now only the verified leaf subject is checked, so such clients and clients with empty subjects are rejected, and their RPCs can fail with `Unauthenticated`.

> With `--grpc-auth-mode=mtls`, `--grpc-auth-mtls-allowed-substrings` was matched against every certificate the client presented, not just the one verified against `--grpc-ca`. A client with any certificate from that CA could append a self-signed certificate with an allowed subject and be admitted ([GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)). The flag is now matched only against the subject of the verified leaf certificate. In mtls mode the flag can also no longer have an empty entry, which matched every subject: an unset or empty value (the default), or a leading, trailing or repeated colon, such as in `CN=vtctld:`.
> - A process started with `--grpc-auth-mode=mtls` logs `Failed to load auth plugin` and exits with status 1 if `--grpc-auth-mtls-allowed-substrings` has an empty entry.
> - Before upgrading, set the flag to non-empty entries, and check that each client certificate's subject, as Go formats it (`CN=vtctld,OU=Vitess,O=Example,C=US`), contains one of them.
> See [#22234](https://github.com/vitessio/vitess/pull/22234) for details.

### Empty entries in `--grpc-auth-mtls-allowed-substrings` rejected

- Affects: mTLS authentication using `--grpc-auth-mtls-allowed-substrings`
- [GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)

Previously, an empty entry—caused by an unset or empty flag value, or a leading, trailing, or repeated colon—matched every subject. Now, a process started in mTLS mode with an empty entry logs `Failed to load auth plugin` and exits with status 1; an entry matching only a non-leaf certificate no longer admits the client.

> With `--grpc-auth-mode=mtls`, `--grpc-auth-mtls-allowed-substrings` was matched against every certificate the client presented, not just the one verified against `--grpc-ca`. A client with any certificate from that CA could append a self-signed certificate with an allowed subject and be admitted ([GHSA-xhx6-rmm2-5h2p](https://github.com/vitessio/vitess/security/advisories/GHSA-xhx6-rmm2-5h2p)). The flag is now matched only against the subject of the verified leaf certificate. In mtls mode the flag can also no longer have an empty entry, which matched every subject: an unset or empty value (the default), or a leading, trailing or repeated colon, such as in `CN=vtctld:`.
> - A process started with `--grpc-auth-mode=mtls` logs `Failed to load auth plugin` and exits with status 1 if `--grpc-auth-mtls-allowed-substrings` has an empty entry.
> - Before upgrading, set the flag to non-empty entries, and check that each client certificate's subject, as Go formats it (`CN=vtctld,OU=Vitess,O=Example,C=US`), contains one of them.
> See [#22234](https://github.com/vitessio/vitess/pull/22234) for details.

### Strict table ACL denies partially parsed `ALTER TABLE` and `CREATE INDEX`

- Affects: tablets with strict table ACL enabled
- Additional action: `--queryserver-config-strict-table-acl`
- [GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)

Previously, an unparsed tail could name tables the planner had not checked. Now these statements are denied when their table set cannot be determined, unless the caller is covered by the ACL exemption or has the required roles for every table.

> Under strict table ACL (`--queryserver-config-strict-table-acl`), only the table a `CREATE TABLE` or `ALTER TABLE` names was checked. A MERGE table's `UNION=(...)` option, a `CREATE TABLE ... LIKE` of a MERGE table, and `ALTER TABLE ... EXCHANGE PARTITION` let a user with ADMIN on one table read and write tables the ACL denied them, and so could a FEDERATED table's `CONNECTION` string where that engine is enabled ([GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)). Now:
> - a partially parsed `ALTER TABLE` or `CREATE INDEX`, and a `CREATE TABLE` or `ALTER TABLE` that sets `CONNECTION`, are denied with `command denied ... for a table set that cannot be determined`. The exceptions are the exempt ACL (`--queryserver-config-acl-exempt-acl`) and a caller with every role in a table group covering every table (`%`).

### VTGate MySQL packet-buffer reuse fixed

- Affects: connections to the VTGate MySQL server
- [GHSA-g6c2-qp3p-x2w2](https://github.com/vitessio/vitess/security/advisories/GHSA-g6c2-qp3p-x2w2)

When a handler kept using a packet after its shared buffer was returned and another connection overwrote it, authentication-switch checks, replication-command arguments, and some malformed-command error replies could use bytes from the other connection. The server now reads packet data before recycling it, uses a separate buffer for authentication-switch data, and clears recycled read packets before reuse.

> - Fixes [GHSA-g6c2-qp3p-x2w2](https://github.com/vitessio/vitess/security/advisories/GHSA-g6c2-qp3p-x2w2): the VTGate MySQL server kept reading a client's packet after returning its buffer to the shared buffer pool, where another connection could overwrite it. The auth switch response checked during login, the arguments of the replication commands, and the error replies to some malformed commands could use bytes from another connection's packet. See [#22247](https://github.com/vitessio/vitess/pull/22247).

### zk2topo topology ACL exposure fixed

- Affects: ZooKeeper deployments using `--topo-zk-auth-file`
- [GHSA-9c2c-hxwj-c5jr](https://github.com/vitessio/vitess/security/advisories/GHSA-9c2c-hxwj-c5jr)

Previously, `zk2topo` created topology znodes with an open ACL, allowing any client that could reach the ZooKeeper ensemble to read, change, or delete the topology. Now, access is restricted to the authenticated identity; components using another identity or no identity receive `zk: not authenticated`.

> With `--topo-zk-auth-file` set, `zk2topo` authenticated its ZooKeeper session but still created every znode, lock and election nodes included, with a `world:anyone` ACL, so any client that could reach the ensemble could read, change or delete the topology ([GHSA-9c2c-hxwj-c5jr](https://github.com/vitessio/vitess/security/advisories/GHSA-9c2c-hxwj-c5jr)). Znodes are now created with ZooKeeper's `auth` ACL scheme, so only the auth file's identity can access them. A missing, unreadable or malformed auth file, or a failed `AddAuth`, now fails the connection instead of continuing unauthenticated. A `digest` auth file must hold both a user and a password, and a trailing CR is dropped like a trailing LF. `vtctldclient`, `topo2topo` and the `zk` tool now take the `--topo-zk-*` flags, and `vttestserver` passes `--topo-zk-auth-file` and the `--topo-zk-tls-*` flags on to `vtcombo`. Without an auth file, nothing changes.
> - Every component that shares the topology must use the same ZooKeeper identity, `vtctldclient --server internal` and `topo2topo` included. A component with another identity, or none, gets `zk: not authenticated`.

### ZooKeeper topology access restricted to the auth-file identity

- Affects: ZooKeeper topology configured with `--topo-zk-auth-file`
- Additional action: All components sharing the topology must use the same ZooKeeper identity. Pre-upgrade znodes require `addauth digest <user>:<password>` and `setAcl -R <parent> auth::cdrwa` on the common parent in each ensemble, after every component runs this release with the auth file.
- [GHSA-9c2c-hxwj-c5jr](https://github.com/vitessio/vitess/security/advisories/GHSA-9c2c-hxwj-c5jr)

Previously, a client that could reach the ensemble could read, change, or delete znodes created with `world:anyone` ACLs; new znodes are now accessible only to the auth-file identity. Auth-file read, parse, or `AddAuth` failures, and a `digest` file without a password, now fail connection or topology calls rather than continuing unauthenticated; pre-upgrade znodes retain their `world:anyone` ACLs.

> With `--topo-zk-auth-file` set, `zk2topo` authenticated its ZooKeeper session but still created every znode, lock and election nodes included, with a `world:anyone` ACL, so any client that could reach the ensemble could read, change or delete the topology ([GHSA-9c2c-hxwj-c5jr](https://github.com/vitessio/vitess/security/advisories/GHSA-9c2c-hxwj-c5jr)). Znodes are now created with ZooKeeper's `auth` ACL scheme, so only the auth file's identity can access them. A missing, unreadable or malformed auth file, or a failed `AddAuth`, now fails the connection instead of continuing unauthenticated. A `digest` auth file must hold both a user and a password, and a trailing CR is dropped like a trailing LF. `vtctldclient`, `topo2topo` and the `zk` tool now take the `--topo-zk-*` flags, and `vttestserver` passes `--topo-zk-auth-file` and the `--topo-zk-tls-*` flags on to `vtcombo`. Without an auth file, nothing changes.
> - A component whose auth file can't be read or parsed, or a `digest` file without a password, now fails every topology call. Before upgrading, check that no component logs `failed to read topo-zk-auth-file`, `failed to parse topo-zk-auth-file contents` or `failed to add auth from topo-zk-auth-file`.

### Strict table ACL checks for tables named in table options

- Affects: tablet setups using strict table ACL
- Additional action: `--queryserver-config-strict-table-acl`
- [GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)

Previously, only the table named in `CREATE TABLE` or `ALTER TABLE` was checked, allowing a user with `ADMIN` on that table to read and write another table named in a table option despite its ACL. Now every table named in a table option, including a MERGE table's `UNION=(...)`, must pass `READER` and `WRITER` checks.

> ### Table ACL: tables bound by MERGE `UNION`, `CREATE TABLE ... LIKE` and `EXCHANGE PARTITION` are checked
> Under strict table ACL (`--queryserver-config-strict-table-acl`), only the table a `CREATE TABLE` or `ALTER TABLE` names was checked. A MERGE table's `UNION=(...)` option, a `CREATE TABLE ... LIKE` of a MERGE table, and `ALTER TABLE ... EXCHANGE PARTITION` let a user with ADMIN on one table read and write tables the ACL denied them, and so could a FEDERATED table's `CONNECTION` string where that engine is enabled ([GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)). Now:
> - tables named by a table option, and the source of `CREATE TABLE ... LIKE`, require READER and WRITER;

### `CREATE TABLE ... LIKE` source ACL checks enforced

- Affects: tablet setups with strict table ACL enabled
- Additional action: `--queryserver-config-strict-table-acl`
- [GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)

Previously, only the destination table was checked, leaving the source unchecked; a MERGE source could also carry over its `UNION` list. Now the source must pass `READER` and `WRITER` checks.

> Under strict table ACL (`--queryserver-config-strict-table-acl`), only the table a `CREATE TABLE` or `ALTER TABLE` names was checked. A MERGE table's `UNION=(...)` option, a `CREATE TABLE ... LIKE` of a MERGE table, and `ALTER TABLE ... EXCHANGE PARTITION` let a user with ADMIN on one table read and write tables the ACL denied them, and so could a FEDERATED table's `CONNECTION` string where that engine is enabled ([GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)). Now:
> - tables named by a table option, and the source of `CREATE TABLE ... LIKE`, require READER and WRITER;

### Strict table ACL now checks both `EXCHANGE PARTITION` tables

- Affects: tablet setups with strict table ACL enabled
- Additional action: `--queryserver-config-strict-table-acl`
- [GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)

Previously, an `ALTER TABLE ... EXCHANGE PARTITION` could let a caller with access to one table read or write the other table despite its ACL. Now both tables must pass ADMIN, READER and WRITER checks.

> Under strict table ACL (`--queryserver-config-strict-table-acl`), only the table a `CREATE TABLE` or `ALTER TABLE` names was checked. A MERGE table's `UNION=(...)` option, a `CREATE TABLE ... LIKE` of a MERGE table, and `ALTER TABLE ... EXCHANGE PARTITION` let a user with ADMIN on one table read and write tables the ACL denied them, and so could a FEDERATED table's `CONNECTION` string where that engine is enabled ([GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)). Now:
> - both tables of `EXCHANGE PARTITION` require ADMIN, READER and WRITER;

### Strict table ACL blocks `CONNECTION` table bindings

- Affects: tablet setups using strict table ACL
- Additional action: `--queryserver-config-strict-table-acl`
- [GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)

Previously, a `CONNECTION` string could bind to a table the ACL could not check by name, allowing access to tables it denied; the note gives FEDERATED tables as an example when that engine is enabled. Such statements are now denied with a `command denied ...` error, except for the ACL-exempt user and callers holding every role in a table group covering every table (`%`).

> Under strict table ACL (`--queryserver-config-strict-table-acl`), only the table a `CREATE TABLE` or `ALTER TABLE` names was checked. A MERGE table's `UNION=(...)` option, a `CREATE TABLE ... LIKE` of a MERGE table, and `ALTER TABLE ... EXCHANGE PARTITION` let a user with ADMIN on one table read and write tables the ACL denied them, and so could a FEDERATED table's `CONNECTION` string where that engine is enabled ([GHSA-q4ch-mhpm-9368](https://github.com/vitessio/vitess/security/advisories/GHSA-q4ch-mhpm-9368)). Now:
> - a partially parsed `ALTER TABLE` or `CREATE INDEX`, and a `CREATE TABLE` or `ALTER TABLE` that sets `CONNECTION`, are denied with `command denied ... for a table set that cannot be determined`. The exceptions are the exempt ACL (`--queryserver-config-acl-exempt-acl`) and a caller with every role in a table group covering every table (`%`).

### `CopySchemaShard` schema-template execution fixed

- Affects: setups that run `CopySchemaShard`, including `Reshard` schema copy unless `--skip-schema-copy` is set
- [GHSA-7g75-v57j-2ghw](https://github.com/vitessio/vitess/security/advisories/GHSA-7g75-v57j-2ghw)

Before the fix, template actions in a copied `SHOW CREATE` statement—for example, in a table comment—could make Vitess run arbitrary SQL as the DBA user on destination primaries. Copied schema text is now treated literally, and definitions with more than one statement after database-name substitution are refused.

> `CopySchemaShard`, which `Reshard` also runs for each new shard unless `--skip-schema-copy` is set, filled the `{{.DatabaseName}}` placeholder by executing each copied `SHOW CREATE` statement as a Go `text/template`. A user able to run DDL could put template actions in, for example, a table comment, and make Vitess run arbitrary SQL as the DBA user on the destination primaries ([GHSA-7g75-v57j-2ghw](https://github.com/vitessio/vitess/security/advisories/GHSA-7g75-v57j-2ghw)). The same pattern existed when a Reshard migrates the keyspace's other workflows (each stream's filter, which can contain table names, was executed as a template to fill in the key range) and in the legacy `vtctl` materializer (`MoveTables`, `Materialize`, `Migrate`, `CreateLookupVindex`). VDiff's `--debug-query` used the diffed query's `FROM` clause as a format string, so a `%` in a table name crashed vttablet. Placeholders are now substituted literally, and nothing else in the text is interpreted.
> - `CopySchemaShard`, and so `Reshard`'s schema copy, refuses a copied definition that is more than one statement once the database name is filled in.

### Reshard stream filters now reject extra template syntax

- Affects: Reshard workflow migrations involving other workflows in the keyspace
- [GHSA-7g75-v57j-2ghw](https://github.com/vitessio/vitess/security/advisories/GHSA-7g75-v57j-2ghw)

During a Reshard workflow migration, a `{{` in another workflow’s stream filter could let template actions rewrite the filter or crash `vtctld` after source writes were stopped; a user able to run DDL could also use template actions to make Vitess run arbitrary SQL as the DBA user on destination primaries. Such filters are now refused: `SwitchTraffic` leaves writes on source shards while replica and rdonly reads switched by that command stay switched, and `--dry-run` reports the error.

> `CopySchemaShard`, which `Reshard` also runs for each new shard unless `--skip-schema-copy` is set, filled the `{{.DatabaseName}}` placeholder by executing each copied `SHOW CREATE` statement as a Go `text/template`. A user able to run DDL could put template actions in, for example, a table comment, and make Vitess run arbitrary SQL as the DBA user on the destination primaries ([GHSA-7g75-v57j-2ghw](https://github.com/vitessio/vitess/security/advisories/GHSA-7g75-v57j-2ghw)). The same pattern existed when a Reshard migrates the keyspace's other workflows (each stream's filter, which can contain table names, was executed as a template to fill in the key range) and in the legacy `vtctl` materializer (`MoveTables`, `Materialize`, `Migrate`, `CreateLookupVindex`). VDiff's `--debug-query` used the diffed query's `FROM` clause as a format string, so a `%` in a table name crashed vttablet. Placeholders are now substituted literally, and nothing else in the text is interpreted.
> - A Reshard's `SwitchTraffic` fails to switch writes if another workflow in the keyspace has a filter that contains `{{`, for example a moved table whose name contains it. Writes stay on the source shards; replica and rdonly reads that the same command switched stay switched, and `--dry-run` reports the error.

### VDiff `--debug-query` `FROM` clause handling fixed

- Affects: VDiff runs using `--debug-query`
- [GHSA-7g75-v57j-2ghw](https://github.com/vitessio/vitess/security/advisories/GHSA-7g75-v57j-2ghw)

A user able to run DDL could put template actions in a table comment and make Vitess run arbitrary SQL as the DBA on destination primaries. A `%` in a table name could crash `vttablet`; with a mismatched or extra row, it could also crash the target primary's `vttablet` or panic legacy VDiff. The diffed query's `FROM` clause is now written as-is rather than treated as a format string, so `%` in a table name no longer causes the described crash.

> `CopySchemaShard`, which `Reshard` also runs for each new shard unless `--skip-schema-copy` is set, filled the `{{.DatabaseName}}` placeholder by executing each copied `SHOW CREATE` statement as a Go `text/template`. A user able to run DDL could put template actions in, for example, a table comment, and make Vitess run arbitrary SQL as the DBA user on the destination primaries ([GHSA-7g75-v57j-2ghw](https://github.com/vitessio/vitess/security/advisories/GHSA-7g75-v57j-2ghw)). The same pattern existed when a Reshard migrates the keyspace's other workflows (each stream's filter, which can contain table names, was executed as a template to fill in the key range) and in the legacy `vtctl` materializer (`MoveTables`, `Materialize`, `Migrate`, `CreateLookupVindex`). VDiff's `--debug-query` used the diffed query's `FROM` clause as a format string, so a `%` in a table name crashed vttablet. Placeholders are now substituted literally, and nothing else in the text is interpreted.

### VDiff table-statistics identifier escaping fixed

- Affects: VDiff table-statistics updates
- [GHSA-mmjh-49cg-g5v2](https://github.com/vitessio/vitess/security/advisories/GHSA-mmjh-49cg-g5v2)

Previously, a table name containing a back quote could change the SQL statement so it did not analyze the intended table. VDiff now escapes database and table identifiers in the `ANALYZE TABLE` statement; ordinary table names are unaffected.

> - Fixes [GHSA-mmjh-49cg-g5v2](https://github.com/vitessio/vitess/security/advisories/GHSA-mmjh-49cg-g5v2): SQL injection through table names in the `ANALYZE TABLE` that VDiff runs for `--update-table-stats`. See [#22243](https://github.com/vitessio/vitess/pull/22243).

### VTGate `COM_REGISTER_SLAVE` packet length checks added

- Affects: VTGate MySQL replication registration
- [GHSA-g6c2-qp3p-x2w2](https://github.com/vitessio/vitess/security/advisories/GHSA-g6c2-qp3p-x2w2)

A hostname, username, or password length extending past a `COM_REGISTER_SLAVE` packet could previously cause an out-of-bounds read or a panic that closed the connection. The parser now checks those lengths against the packet.

> - Fixes [GHSA-g6c2-qp3p-x2w2](https://github.com/vitessio/vitess/security/advisories/GHSA-g6c2-qp3p-x2w2): the VTGate MySQL server kept reading a client's packet after returning its buffer to the shared buffer pool, where another connection could overwrite it. The auth switch response checked during login, the arguments of the replication commands, and the error replies to some malformed commands could use bytes from another connection's packet. See [#22247](https://github.com/vitessio/vitess/pull/22247).

### VDiff and Reshard `stop_pos` SQL injection fixed

- Affects: VDiff workflows and `Reshard` operations that update `stop_pos` from source-tablet replication positions
- [GHSA-hqg6-fhvc-3vmf](https://github.com/vitessio/vitess/security/advisories/GHSA-hqg6-fhvc-3vmf)

A quote in a reported position could break the unescaped update and allow SQL injection. Positions are now written as escaped SQL string literals; ordinary positions leave statements unchanged.

> - Fixes [GHSA-hqg6-fhvc-3vmf](https://github.com/vitessio/vitess/security/advisories/GHSA-hqg6-fhvc-3vmf): SQL injection through a replication position from a source tablet in the `stop_pos` update that VDiff runs and in the update that `Reshard` runs when switching writes. See [#22250](https://github.com/vitessio/vitess/pull/22250).

### VDiff and Reshard replication-position SQL injection fixed

- Affects: VDiff v2 and legacy VDiff, and Reshard write switching
- [GHSA-hqg6-fhvc-3vmf](https://github.com/vitessio/vitess/security/advisories/GHSA-hqg6-fhvc-3vmf)

A replication position from a source tablet could enable SQL injection in VDiff’s `stop_pos` update and Reshard’s update when switching writes. VDiff now parses source snapshot positions before updating `stop_pos`: an unparsable position fails without changing the target stream, while a parseable position is stored re-encoded.

> - Fixes [GHSA-hqg6-fhvc-3vmf](https://github.com/vitessio/vitess/security/advisories/GHSA-hqg6-fhvc-3vmf): SQL injection through a replication position from a source tablet in the `stop_pos` update that VDiff runs and in the update that `Reshard` runs when switching writes. See [#22250](https://github.com/vitessio/vitess/pull/22250).

## Breaking changes (1)

### ZooKeeper `digest` auth files require complete credentials

- Affects: ZooKeeper `digest` auth files
- Action required: The `digest` auth file must contain both a user and a password, in the form `digest:<user>:<password>`.

A trailing CR is discarded, so a CRLF-terminated file yields the same identity as `addauth digest <user>:<password>` in `zkCli.sh`.

> With `--topo-zk-auth-file` set, `zk2topo` authenticated its ZooKeeper session but still created every znode, lock and election nodes included, with a `world:anyone` ACL, so any client that could reach the ensemble could read, change or delete the topology ([GHSA-9c2c-hxwj-c5jr](https://github.com/vitessio/vitess/security/advisories/GHSA-9c2c-hxwj-c5jr)). Znodes are now created with ZooKeeper's `auth` ACL scheme, so only the auth file's identity can access them. A missing, unreadable or malformed auth file, or a failed `AddAuth`, now fails the connection instead of continuing unauthenticated. A `digest` auth file must hold both a user and a password, and a trailing CR is dropped like a trailing LF. `vtctldclient`, `topo2topo` and the `zk` tool now take the `--topo-zk-*` flags, and `vttestserver` passes `--topo-zk-auth-file` and the `--topo-zk-tls-*` flags on to `vtcombo`. Without an auth file, nothing changes.

## Important fixes (2)

### VTGate prepared-statement connection closure fixed

- Affects: VTGate MySQL prepared-statement handling

When a malformed `COM_STMT_RESET` packet arrived or the statement id was unknown, the server sent an error and then closed the connection after a nil `PrepareData` dereference. Now it sends one error and keeps the connection open.

> - Fixes [GHSA-g6c2-qp3p-x2w2](https://github.com/vitessio/vitess/security/advisories/GHSA-g6c2-qp3p-x2w2): the VTGate MySQL server kept reading a client's packet after returning its buffer to the shared buffer pool, where another connection could overwrite it. The auth switch response checked during login, the arguments of the replication commands, and the error replies to some malformed commands could use bytes from another connection's packet. See [#22247](https://github.com/vitessio/vitess/pull/22247).

### Unknown `COM_SET_OPTION` operations return only an error

- Affects: `COM_SET_OPTION` handling in VTGate MySQL

When a client sent `COM_SET_OPTION` with an unknown operation, the server returned an error followed by an OK, leaving the client one reply out of step.

> - Fixes [GHSA-g6c2-qp3p-x2w2](https://github.com/vitessio/vitess/security/advisories/GHSA-g6c2-qp3p-x2w2): the VTGate MySQL server kept reading a client's packet after returning its buffer to the shared buffer pool, where another connection could overwrite it. The auth switch response checked during login, the arguments of the replication commands, and the error replies to some malformed commands could use bytes from another connection's packet. See [#22247](https://github.com/vitessio/vitess/pull/22247).

## Enhancements (2)

- ZooKeeper topology flags added to `vtctldclient`, `topo2topo` and `zk` (To use: Relevant `--topo-zk-*` flags; `vtctldclient` also requires `--server internal`.)
- `vttestserver` forwards ZooKeeper auth and TLS flags to `vtcombo` (To use: Using an external topology)

## Other changes (2)

- Legacy `vtctl` materializer stops source-expression template substitution
- VTGate unknown-command logs omit packet bytes

---

Summaries are produced by AI, so they can be wrong, and they are provided without warranty.
