Medium

Cocotais Bot has builtin .echo command injection

  • Disclosed: 19.05.2025
  • Updated: 11.10.2026 10:22

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 <qqbot-at-everyone /> 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 <qqbot-at-everyone />, 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 <qqbot-at-everyone />

 The bot will then send a message containing <qqbot-at-everyone />, 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 <qqbot-at-everyone />
  1. The bot will respond by repeating the message, and the platform will interpret <qqbot-at-everyone /> as an @全体成员 mention.
  2. All the chat members receive a notification, despite the user lacking that permission.  

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package cocotais-bot >= 1.5.0-test2-hotfix, < 1.6.2 1.6.2

References

CVSS score 6.5/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
Weakness (CWE)
CWE-74
Platform
npm
Package
cocotais-bot
Disclosed
19.05.2025
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-mj2c-8hxf-ffvq - CC BY 4.0

Vulnerability history: cocotais-bot

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

This is the only known vulnerability of this package.

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.