The vulnerability lies in the handling of transaction control options, specifically the options.WithCommit() flag. When a user calls transaction.Execute with this option, the intention is to commit the transaction after the query execution. The bug was introduced in a refactoring (commit 251128a64763555d9a79ee7a131dd154c9000eb9) that led to the transaction control settings being overwritten down the call stack.
The call flow is as follows: transaction.Execute() -> Session.Execute() -> tableClientExecutor.execute().
Session.Execute() would correctly prepare the gRPC request with the commit flag set. However, tableClientExecutor.execute() would then incorrectly overwrite the TxControl field of the request, effectively discarding the commit flag. This meant the final request sent to the YDB server did not include the instruction to commit the transaction.
The fix (commit 25dcff4c41153f1f9413512ba12999b40bf7154d) resolves this by removing the overwriting logic from tableClientExecutor.execute(), ensuring that the transaction control settings prepared by Session.Execute() are preserved. The primary vulnerable function is tableClientExecutor.execute where the faulty logic resided, but transaction.Execute is also listed as it is the public-facing function that developers would observe the incorrect behavior from.