The vulnerability is a privilege escalation in the 'openclaw' application, where a user with 'operator.write' permissions could perform actions that should be restricted to 'operator.admin'. Specifically, when sending a message or a poll to a Telegram channel using a non-numeric alias (e.g., '@channelname'), the application resolves this alias to a numeric chat ID. It then attempts to persist this resolved ID back into the main configuration file and any associated cron jobs. This writeback operation is a privileged action.
The root cause of the vulnerability was the failure to check the user's permissions before performing this writeback. The gateway methods sendHandlers.send and sendHandlers.poll were the entry points for this vulnerable workflow. They accepted requests from users with operator.write scope but did not propagate the user's scope information down the call chain.
The function maybePersistResolvedTelegramTarget in extensions/telegram/src/target-writeback.ts was the function that performed the unsafe write operation without any permission checks.
The patch addresses this by passing the client's security scopes (as gatewayClientScopes) from the initial gateway request all the way down to maybePersistResolvedTelegramTarget. This function now includes a check to ensure the operator.admin scope is present before attempting to modify any configuration or cron jobs, effectively closing the privilege escalation vector.