T05 · Unauthorized Access and Privilege Escalation
- Location
scripts/index.js:46- Finding
Insufficient authorization controls expose customer order information
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:4;scripts/index.js:46-54
Vulnerability Type: Missing caller-level authorization and excessive privilege
Risk Level: HighVulnerable Code
yaml user-invocable: truejs check_order: async ({ id }) => { try { if (!id) throw new Error('Order ID is required.'); const order = await callWoo('/orders/get', { id: parseInt(id) }); let output = `📦 Order #${order.id} | Status: ${order.status} | Total: ${order.currency} ${order.total}\n`; output += `Date: ${order.date_created}\n`; output += `Customer: ${order.billing.first_name || ''} ${order.billing.last_name || ''}\n`;Technical Analysis
The user-invocable
check_ordertool accepts an arbitrary order ID and uses the server-sideWPCLAW_STORE_SECRETto issue a privileged, signed request. It does not verify the caller's identity, role, store affiliation, or ownership of the requested order.WooCommerce order identifiers are commonly numeric and may be predictable. The validation also only checks whether
idis truthy before passing it toparseInt; it does not require a canonical positive integer. Authorization is therefore delegated entirely to possession of the Skill's shared store credential, even though callers do not personally possess that credential.The response exposes the order number, status, total, creation date, customer first and last name, and purchased line items. This exceeds least privilege if the Skill is available to untrusted users rather than exclusively to authorized store operators.
Attack Path
- An untrusted or insufficiently privileged user obtains permission to invoke the Skill.
- The user calls
check_orderwith a guessed numeric order ID. - The Skill signs the request with the privileged store secret.
- The WooCommerce connector treats the request as authorized and returns t ...[truncated 685 chars]
- Remediation
View remediation
Remediation Suggestions
- Restrict
check_orderto authenticated store administrators or explicitly trusted operational roles. - Pass verified caller identity and authorization context to the backend rather than relying solely on a shared Skill credential.
- Enforce order ownership or role-based access on the WordPress connector before returning order data.
- Require
idto be a canonical, positive, safe integer; reject partial numeric strings, negative values, zero, and values outside the expected range. - Add rate limits, enumeration detection, audit logging, and alerts for repeated failed or sequential order queries.
- Return only fields necessary for the caller's task. Redact customer names and purchase details when they are not required.
- Use separate credentials with narrowly scoped permissions for order lookup, product search, and status checks.
- Restrict
