generated from host-uk/core-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
Issue
The CreateCoupon tool at src/Mcp/Tools/Commerce/CreateCoupon.php does not use the RequiresWorkspaceContext trait that other commerce tools use (like UpgradePlan). This means the tool can potentially be called without proper workspace authorization.
File
src/Mcp/Tools/Commerce/CreateCoupon.php
Impact
- The tool creates coupons globally without workspace scoping
- No authorization check ensures the caller has permission to create coupons
- Potential for unauthorized coupon creation if the MCP endpoint is exposed
Recommendation
- Add
use RequiresWorkspaceContext;trait - Verify the caller has permission to create coupons (e.g., admin role check)
- Consider whether coupons should be workspace-scoped
Severity
High - Authorization bypass vulnerability
Reactions are currently unavailable