The vulnerability is an RBAC bypass in etcd's handling of transaction (Txn) requests. An authenticated user with limited permissions could exploit this to read unauthorized data or attach leases without permission. The root cause was an insufficient authorization check within the transaction processing logic.
The primary vulnerable function is checkTxnReqsPermission located in server/etcdserver/apply/apply_auth.go. When processing a Put request inside a transaction, this function only checked for write permission on the specified key. It failed to check for two important cases:
- If the
Put request included the PrevKv flag to retrieve the previous value, the system did not check if the user had read permission for that key.
- If the
Put request included a lease ID to attach a lease to the key, the system did not check if the user had permission to use that lease.
The entry point for an attacker is the EtcdServer.Txn gRPC method. This method receives the transaction request and passes it to the authorization logic. The patch for this vulnerability involved modifying the call chain starting from EtcdServer.Txn to pass a lessor object down to the permission checking functions. This allows the updated authorization logic in checkTxnReqsPermission (which now calls a new checkPutAuth function) to properly validate lease attachment permissions. The check for PrevKv is also handled within the new checkPutAuth function. Therefore, EtcdServer.Txn and checkTxnReqsPermission are the key functions that would appear in a runtime profile during exploitation.