Back to Home

Insecure Design

A04:2021 - Architecture & design flaws

What is Insecure Design?

Insecure design is a broad category representing different weaknesses, expressed as a missing or ineffective control design. These are flaws in the fundamental architecture of the application.

Common Design Flaws:

  • Missing or insufficient workflow validation
  • Business logic flaws (e.g., confirm order without payment)
  • Insecure default configurations
  • No threat modeling or secure design patterns
  • Trusting client-side data without server validation

Before WAF: Vulnerable

Without proper workflow validation, business logic can be bypassed

Step 1: Bypass Payment Workflow

# Confirm order WITHOUT payment verification
POST /api/insecure-design
{"order_id": "12345"}

# Response shows order confirmed even though payment was never verified!

Vulnerability: API confirms orders without checking payment status.

After WAF: Protected

Cloudflare WAF can detect and block suspicious request patterns

Enable Cloudflare Protection:

  1. Go to Cloudflare Dashboard → Security → WAF
  2. Create custom rules for workflow enforcement
  3. Enable "Anomaly Detection" for API abuse
  4. Configure rate limiting on state-changing endpoints

Result: Suspicious workflow bypass attempts are detected and blocked.

Cloudflare Protection

  • Custom Rules: Enforce business logic at the edge
  • Rate Limiting: Prevent automated abuse of workflows
  • API Shield: Detect anomalous API behavior