Skip to content

Security: McpApiController namespace mismatch and missing authorization #11

@Snider

Description

@Snider

Issue

The McpApiController at src/Mcp/Controllers/McpApiController.php has a namespace mismatch - it declares namespace Mod\Api\Controllers; but resides in the Core package structure.

File

src/Mcp/Controllers/McpApiController.php (Line 5)

Current Code

namespace Mod\Api\Controllers;

Expected

namespace Core\Mcp\Controllers;

Additional Issues in This File

  1. Missing rate limiting: The callTool method has no rate limiting beyond quota checks
  2. Potential command injection (Line 227-236): The artisan command execution uses proc_open with user-supplied server ID from config, but the config lookup ($commandMap[$server]) could potentially be exploited if the config is modified
  3. Missing input sanitization: The $validated['server'] and $validated['tool'] values are passed directly to processes

Severity

Medium - Namespace issue will cause autoloading failure

Metadata

Metadata

Assignees

No one assigned

    Labels

    julesFor Jules AI to work onlang:phpPHP/Laravel

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions