CVE-2026-30861: WeKnora: Remote Code Execution (RCE) via Command Injection in MCP Stdio Configuration Validation

Published Mar 7, 2026
·
Updated

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 LDPRELOAD, 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 [JWTTOKENFROMREGISTRATION] Content-Type: application/json

{ "name":"rce", "description":"rce", "enabled":true, "transporttype":"stdio", "stdioconfig":{ "command":"npx", "args":["node","-p","require('fs').writeFileSync('/tmp/pwned.txt', 'Hacked by attacker')"] }, "envvars":{} }

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 [JWTTOKENFROMREGISTRATION] 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 ---

Other sources

WeKnora is an LLM-powered framework designed for deep document understanding and semantic retrieval. From version 0.2.5 to before version 0.2.10, an unauthenticated remote code execution (RCE) vulnerability exists in the MCP stdio configuration validation. 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. This issue has been patched in version 0.2.10.

MITRE

Affected Software

2 affected componentsFixes available
go/github.com/Tencent/WeKnora>=0.2.5<0.2.10
0.2.10
Tencent WeKnora>=0.2.5<0.2.10

Event History

Mar 7, 2026
Advisory Published
via GitHub·01:59 AM
Data Sourced
via GitHub·01:59 AM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·04:38 PM
Data Sourced
via MITRE·04:38 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:15 PM
DescriptionSeverityWeaknessAffected Software
Feb 17, 58167
Event
via FIRST·05:54 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-30861?

CVE-2026-30861 is classified as a critical vulnerability due to its potential for unauthenticated remote code execution.

2

How do I fix CVE-2026-30861?

To fix CVE-2026-30861, upgrade your WeKnora installation to version 2.0.5 or later, as earlier versions are affected by this vulnerability.

3

What are the affected software versions for CVE-2026-30861?

CVE-2026-30861 affects WeKnora versions between 0.2.6 and 0.2.10, inclusive.

4

What kind of attack is possible with CVE-2026-30861?

CVE-2026-30861 allows attackers to execute arbitrary commands on the server due to a command injection vulnerability.

5

Is authentication required to exploit CVE-2026-30861?

No, CVE-2026-30861 can be exploited without authentication.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203