CVE-2025-47948: Cocotais bot Cocotais Bot Has Builtin .echo Vulnerability

MODERATE
Advisory Identifier: GHSA-mj2c-8hxf-ffvq
CVSS 6.5
CWE-74
Published
Advisory Summary

CVE-2025-47948 is a MODERATE (CVSS 6.5) cocotais bot has builtin .echo vulnerability (CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')) affecting Cocotais bot libraries in the npm ecosystem. The issue involves cocotais bot has builtin .echo command injection. Remediation is available by upgrading affected packages to version 1.6.2.

CVE-2025-47948 at a Glance

CVE Identifier CVE-2025-47948
GHSA Identifier GHSA-mj2c-8hxf-ffvq
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
Affected Product Cocotais bot
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2025-47948

To remediate this vulnerability, upgrade all affected Cocotais bot dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

cocotais-bot fixed: 1.6.2
npm install cocotais-bot@1.6.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls cocotais-bot

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-47948, inspect your project dependencies using npm:

npm ls cocotais-bot

Analyze the terminal output to locate any version of Cocotais bot in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.2), your application is affected.

Note: The npm ls cocotais-bot command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'), where the product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. In Cocotais bot, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2025-47948 Affected Cocotais bot Versions

1 component(s)
Fixed Versions:
1.6.2
Product / Package Ecosystem Affected Versions Fixed Version
cocotais-bot
npm
≥ 1.5.0-test2-hotfix
< 1.6.2
1.6.2

References

Frequently Asked Questions

What is CVE-2025-47948?
CVE-2025-47948 is a security vulnerability in Cocotais bot involving Cocotais Bot has builtin .echo command injection under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection').
Which Cocotais bot versions are affected?
Affected versions include releases prior to 1.6.2 across affected packages: cocotais-bot.
What version fixes CVE-2025-47948?
Upgrading to 1.6.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cocotais-bot affected?
Yes, cocotais-bot is affected in releases prior to 1.6.2. Upgrade your dependency to 1.6.2 or later.
What is the CVSS score of CVE-2025-47948?
CVE-2025-47948 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L.
What CWE is associated with CVE-2025-47948?
CVE-2025-47948 is classified under CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2025-47948?
Run the dependency tree command: 'npm ls cocotais-bot'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mj2c-8hxf-ffvq",
  "modified" : "2025-05-19T16:25:05Z",
  "published" : "2025-05-19T16:25:05Z",
  "aliases" : [ "CVE-2025-47948" ],
  "summary" : "Cocotais Bot has builtin .echo command injection",
  "details" : "### Summary\n\nA 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.\n\n### Details\n\nThe 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.\n\nSince the `/echo` command blindly echoes any content, a user can exploit this by sending:\n\n```\n/echo <qqbot-at-everyone />\n```\n\nThe 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.\n\n### PoC\n\n1. Set up a chatbot using the affected framework.\n2. Join the chat that includes the bot as a regular user with **no permission to use @全体成员**.\n3. Send the following message in the chat:\n\n```\n/echo <qqbot-at-everyone />\n```\n4. The bot will respond by repeating the message, and the platform will interpret `<qqbot-at-everyone />` as an @全体成员 mention.\n5. All the chat members receive a notification, despite the user lacking that permission.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "cocotais-bot"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.0-test2-hotfix"
      }, {
        "fixed" : "1.6.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cocotais/cocotais-bot/security/advisories/GHSA-mj2c-8hxf-ffvq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-47948"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cocotais/cocotais-bot/commit/d1cf01a9a41b3131241d1833444b890c8d6e70b8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cocotais/cocotais-bot"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-05-19T16:25:05Z",
    "nvd_published_at" : "2025-05-17T19:15:46Z"
  }
}