Skip to content
Medium 5.4

Bot owners could post in and list other users' private channels by transferring the bot

GHSA-fphq-r53h-f8qj First seen on SecPulse

Summary

Summary

A user who owned a bot could make another user its owner while keeping a working copy of the bot's API key. Since bots can send messages to any channel their owner can, the previous owner could then use the bot to post in the new owner's private channels, and to list those channels. A...

Affected packages

PackageAffected → Fixed
—Zulip server
< 12.4→ 12.4
—Zulip server
= 13.0-rc1→ 13.0-rc2
Original description The description as published by the source.

Summary

A user who owned a bot could make another user its owner while keeping a working copy of the bot's API key. Since bots can send messages to any channel their owner can, the previous owner could then use the bot to post in the new owner's private channels, and to list those channels. A deactivated user could gain the same ability if an administrator reactivated a bot they had owned, because that makes the administrator the bot's owner. Severity is moderate: the attacker can't read messages in those channels, but by default, any user other than a guest can create a bot.

Details

Bots can send messages to any channel that their owner can, inheriting their owner's sending permissions. A bot can also list the channels its owner is subscribed to, including their names, descriptions, and subscriber counts.

A bot's owner could make any other active user the bot's owner, without administrator permissions (patch_bot_backend in zerver/views/users.py). The bot's API key didn't change, so the previous owner could keep using the bot with the new owner's channel access. The new owner wasn't notified that they had been given the bot.

Since Zulip Server 8.0, reactivating a bot whose owner is deactivated makes the administrator who reactivates it the bot's owner (do_reactivate_user in zerver/actions/create_user.py). The bot's API key didn't change in this case either. A bot's API key keeps working when its owner is deactivated, so the deactivated owner could use the…

Source: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details