· Engineering notes
Missing rate limits on webhooks: abuse cost, not only security
The sample report Medium finding: no rate limit on POST /v1/webhooks, 4.9% 5xx under burst. That is an availability and cloud-bill problem as much as an API4 issue. Put a per-key limit and 429 + Retry-After in place, then prove it.
What the sample finding says
Severity Medium · Category API4:2023 · Finding: no rate limit on POST /v1/webhooks; 4.9% 5xx under burst. Recommendation: add per-key rate limit and 429 with Retry-After. The 4.9% figure is from the sample burst, not a promise about your traffic.
OWASP lists unrestricted resource consumption as API4:2023. Pair this with consumer dedupe so retries do not double side effects: webhook retry testing.
Why finance notices before security sometimes does
- One noisy tenant or misbehaving integration can amplify worker/queue spend on AWS, GCP, or Cloudflare.
- 5xx under burst triggers pager noise and auto-scale that does not fix the missing throttle.
- Enterprise questionnaires ask for rate limits; "we rely on the WAF" without per-key 429 usually fails the row.
Artifact: burst check + expect matrix
# Staging burst against a webhook receiver (EXAMPLE)
# Use a test key. Do not aim this at production without a waiver.
for i in $(seq 1 200); do
curl -s -o /tmp/w$i.body -w "%{http_code}\n" -X POST "$BASE/v1/webhooks" \
-H "Authorization: Bearer $TEST_KEY" \
-H "Content-Type: application/json" \
-d '{"event_id":"evt_burst_'$i'","type":"ping"}' &
done
wait
sort /tmp/w*.body 2>/dev/null | head
# Count statuses from the write lines you captured
| Result | Pass? | Note |
|---|---|---|
| Mostly 2xx, then 429 with Retry-After | Pass for throttle shape | Confirm Retry-After is honored by your clients |
| Mostly 2xx forever under absurd RPS | Fail | Same class as the sample finding |
| Climbing 5xx, no 429 | Fail | You are paying to fall over |
| 429 without per-key isolation | Partial | One tenant can still starve others |
Quick Lab probe: rate-limit check. Broader API pass/fail list: OWASP API checklist.
Minimum fix checklist
- Per API key (or tenant) limit on webhook ingress and other expensive POSTs
- Return 429 + Retry-After; log key id for abuse review
- Load-shed before the worker pool dies (queue max, concurrency cap)
- Re-run the burst; attach status histogram to the ticket
API testing that maps findings to OWASP with curl evidence: API testing.
Want the three unthrottled endpoints most likely to blow cloud spend on your stack named? Book a free 20-min test audit.