GitHub Advisoryadvisory · npm
GHSA-mj2c-8hxf-ffvq Cocotais Bot has builtin .echo command injection
MEDIUM
Official page ↗
- Aliases
- CVE-2025-47948
- Ecosystem
- npm
- Packages
- cocotais-bot
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
- Weaknesses
- CWE-74
- Reviewed
- 2025-05-19
Affected packages
• npm cocotais-bot: >= 1.5.0-test2-hotfix, < 1.6.2 → fixed in 1.6.2
Description
Summary
A command echoing feature in the framework allows users to indirectly trigger privileged behavior by injecting special platform tags. Specifically, an unauthorized user can use the `/echo ` command to cause the bot to send a message that mentions all members in the chat, bypassing any permission controls. This can lead to spam, disruption, or abuse of notification systems.
Details
The framework provides a command `/echo` that causes the bot to repeat any user-provided message verbatim in the group chat. However, the bot fails to sanitize or filter platform-specific control elements such as ``, which, when included in a message, mentions everyone (i.e., @全体成员). While normal users are forbidden from using this tag in normal chats, the bot, which has higher privileges, is allowed to do so.
Since the `/echo` command blindly echoes any content, a user can exploit this by sending:
```
/echo
```
The bot will then send a message containing ``, causing the platform to interpret it as an @全体成员 command, effectively allowing an unauthorized user to @everyone via the bot.
PoC
1. Set up a chatbot using the affected framework.
2. Join the chat that includes the bot as a regular user with no permission to use @全体成员.
3. Send the following message in the chat:
```
/echo
```
4. The bot will respond by repeating the message, and the platform will interpret `` as an @全体成员 mention.
5. All the chat members receive a notification, despite the user lacking that permission.
Related
Alias · CVE (1)
- CVE-2025-47948 Cocotais Bot is a QQ official robot framework based on qq-bot-sdk. vulnerability
Weakness · CWE (1)
- CWE-74 Improper Neutralization of Special Elements in Output Used by a Downstream Component weakness