T05 · Unauthorized Access and Privilege Escalation
Error
- Location
- workflows/01-new-order-webhook.json:5
- Finding
- Unauthenticated Webhooks Trigger Privileged and Billable Operations<![CDATA[ ## Vulnerability Details **File Location**: `workflows/01-new-order-webhook.json:5-18` **Additional Affected Locations**: `workflows/02-cod-confirmation-call.json:5-18`, `workflows/03-prepaid-confirmation.json:5-18`, `workflows/04-call-result-handler.json:5-18`, `workflows/06-whatsapp-sms-fallback.json:5-18`, `workflows/07-returns-faq-handler.json:5-18`, `workflows/08-order-status-updater.json:5-18`, `workflows/09-crm-sheet-logger.json:5-18`, `workflows/12-customer-callback.json:5-18` **Vulnerability Type**: Missing authentication and request-signature validation **Risk Level**: High ### Vulnerable Code ```json { "parameters": { "httpMethod": "POST", "path": "ecomm-ai/new-order", "responseMode": "responseNode", "options": {} }, "name": "New Order Webhook", "type": "n8n-nodes-base.webhook", "typeVersion": 2, "webhookId": "ecomm-new-order" } ``` Equivalent unauthenticated webhook definitions are used throughout the listed workflows. No authentication setting, signature-verification node, shared secret, replay protection, or caller authorization check is present. ### Technical Analysis These public webhook endpoints are trust boundaries. They accept caller-controlled input and then execute workflows using credentials owned by the n8n operator, including Vapi, Twilio, WhatsApp, Shopify, WooCommerce, Google Sheets, HubSpot, OpenAI, and SMTP credentials. Knowing or discovering an endpoint path is sufficient to submit a request. The predictable `ecomm-ai/*` paths further reduce the effort needed to identify the endpoints. Authentication is absent both from externally consumed webhooks and from the internal workflow-to-workflow webhook calls. Input validation does not replace authentication. Even workflows that check whether a phone number is present do not establish that the caller is an authorized commerce platform or that the submitted order is genuine. ### Attack Path 1. An attacker identifies the public n8n base URL ...[truncated 1421 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Enable n8n webhook authentication for every externally reachable endpoint. 2. Verify provider-specific signatures against the raw request body: - Shopify HMAC headers. - WooCommerce webhook signatures. - Vapi callback signatures or an equivalent shared-secret mechanism. - Twilio request signatures for Twilio-originated callbacks. 3. Use separate internal endpoints for workflow-to-workflow communication and protect them with a randomly generated secret or authenticated n8n sub-workflow execution. 4. Reject requests with missing, invalid, or expired timestamps and store event identifiers to prevent replay. 5. Apply endpoint-specific schemas, strict field limits, phone-number validation, and payload-size limits. 6. Add per-source rate limiting and anomaly alerts for call and messaging volume. 7. Restrict network access to internal-only webhooks where possible. 8. Use separate, least-privilege credentials for each workflow rather than broadly shared integration credentials. ]]>
