Framework Security

Securing Express and Fastify REST APIs against BOLA, SSRF, and prototype pollution

Lock down Node.js API middleware order, schema validation, timing-safe webhook HMAC verification, and outbound URL allowlists.

Prerequisites

  • Express or Fastify service
STEP 01

Verify auth middleware ordering

Mount rate limits and authentication guards ahead of resource handlers across all router groups.

STEP 02

Validate raw bodies for webhooks

Verify HMAC signatures against raw Buffer bytes using crypto.timingSafeEqual.

Related AegisSec skills