The vulnerability lies in the StripeTrigger.node.ts file, specifically within the webhook method of the StripeTrigger class. The advisory states that n8n was not verifying the signature of incoming Stripe webhooks. The provided commit patch confirms this. Before the patch, the webhook method would receive a request and immediately start processing its body without any authentication or signature verification. An attacker who knew the webhook's unique URL could send a forged POST request to trigger the workflow.
The patch rectifies this by introducing a new helper function, verifySignature, in a new file StripeTriggerHelpers.ts. This function implements the required signature verification logic as recommended by Stripe, using a signing secret. The webhook method in StripeTrigger.node.ts is modified to call this new verifySignature function. If the signature is invalid, it now correctly returns a 401 Unauthorized error, preventing the forged request from being processed. Therefore, the StripeTrigger.webhook method is the primary vulnerable function, as it was the entry point that lacked the necessary security control.