Rules›northwind-webhook-signature-unverified
northwind-webhook-signature-unverified
errornorthwind/security/webhook-signature-unverified
The webhook route parses the request body directly with JSON.parse instead of northwind.webhooks.constructEvent, so the handler trusts an event that never proved it came from Northwind.
24
codebases affected, of 58
41%
of everything we scanned
▼17
points since the first docs fix
2
docs commits aimed at this
Where it’s failing
Webhook payload is parsed without verifying the northwind-signature header.
what we find
what we change it to
Parse with northwind.webhooks.constructEvent(rawBody, req.headers["northwind-signature"], process.env.NORTHWIND_WEBHOOK_SECRET) inside a try/catch, and return 400 when it throws. The route must receive the raw body — JSON body parsers break the signature.
Metadata
- Category
- security
- Type
- problem
- Severity
- error
- CWE
- CWE-345
- OWASP
- A02:2021 Cryptographic Failures
- Recommended
- yes
- Languages
- javascriptpython
Live telemetry
24 / 58 scans
Fired in 41% of scanned codebases.
After every docs commit
docs(webhooks): raw-body example ahead of the JSON parser
e6b91d4 · merged 8 weeks ago · PR drafted by api-doctor
docs(webhooks): constructEvent in the quickstart handler
b13e8f6 · merged 4 weeks ago · PR drafted by api-doctor
docs(webhooks): CAUTION — parse the raw body, then verify the signature
drafted today by api-doctor · ready to review
Review & open PR →A fix for your docs page
Wherever this rule fires, a page on your docs site taught it. api-doctor writes the edit and opens it as a pull request on your docs repo — you review and merge.
Edit drafted for your docs page
docs/content/guides/webhooks/receiving-events.mdx · docs(webhooks): CAUTION — parse the raw body, then verify the signature
History
Follow the handler through router-level middleware
2 weeks ago · via GitHub
Treat a JSON-parsed body as unverifiable, not just a missing call
7 weeks ago · via GitHub
Initial rule — constructEvent missing on a webhook route
13 weeks ago · via GitHub