Course contentsShow
← Software Engineering
Lesson 1045 of 1,93332. Security EngineeringFree lesson

A04: Insecure Design

Missing or ineffective control design that cannot be fixed by implementation alone.

A04: Insecure Design

What you'll learn: How missing or flawed security controls at the design level create vulnerabilities that code alone cannot fix.

What is Insecure Design?

Insecure Design occurs when security problems are baked into your application's architecture or business logic from the start. Unlike implementation bugs (writing code incorrectly), insecure design means the plan itself is flawed. You can write perfect code that still leaves your system vulnerable because the underlying design lacks necessary security controls.

Think of it like building a house: if your blueprint has no locks on the doors, it doesn't matter how well the carpenter builds those doors—the house is still insecure by design.

Common Examples

Missing rate limiting: Your password reset feature works perfectly, but there's no limit on attempts. An attacker can brute-force reset tokens because the design forgot to include throttling.

Insufficient workflow validation: An e-commerce system lets users modify their cart, but never validates that users can only purchase items they actually added. The design assumes trust rather than enforcing complete mediation.

No business logic safeguards: A fund transfer system checks authentication but doesn't verify account balance limits or transaction patterns—the design lacks fraud detection controls entirely.

Why It Matters

You cannot patch your way out of insecure design. If defense in depth wasn't planned from the start, adding security later often means architectural rewrites. Unlike A03 (Injection) where input validation fixes the issue, insecure design requires rethinking how components interact and what controls exist at trust boundaries.

Threat modeling during design phase—asking "what could go wrong?"—prevents these flaws before any code is written.

Key Takeaway: Insecure design is about missing security controls in your architecture; no amount of clean coding can compensate for a fundamentally flawed security blueprint.