Insecure Design is one of three new categories introduced in the 2021 Top 10, and it marks a shift in where OWASP looks for risk. Most other items on the list describe a flaw in implementation: a missing check, a weak cipher, an unsanitised input. A04 describes a flaw in the design itself: a system that would be insecure even if every line of code were written flawlessly, because the threat was never considered.

OWASP has since published a 2025 edition of the Top 10. This article covers the 2021 edition.

OWASP is careful to distinguish insecure design from insecure implementation. A secure design can be undone by a bad implementation bug. But an insecure design cannot be rescued by perfect implementation. There is no code fix for a missing control that was never specified. The workflow simply lacks the defense, and no amount of careful coding will add one that was never designed in.

What a design flaw looks like

Insecure Design: The Flaws You Cannot PatchDiagram with these labels, in reading order: reached; Hostile user; Business flow; no control by design; Code is flawless; nothing to enforce; Unintended state; price=1.00 accepted; Missing control was; never designed in; Perfect code can't; add it.reachedHostile userBusiness flowno control by designCode is flawlessnothing to enforceUnintended stateprice=1.00 acceptedMissing control wasnever designed inPerfect code can'tadd it
No code fix exists for a defense the design never included.

Consider an account-recovery flow built entirely on knowledge-based questions such as mother's maiden name and first school, all of which are discoverable or guessable. Each individual line of code may be correct: the input is validated, the query is parameterised, the answer is compared safely. The flaw is architectural. The design chose a weak authentication factor, and no implementation quality can compensate for that choice.

  • Missing rate limits by design. A workflow that never contemplated abuse, no throttle on password resets, no limit on ticket purchases, invites automated exploitation.
  • Trust placed in the client. A checkout that calculates the price in the browser, or a mobile app that assumes it is the only caller of its API.
  • Business-logic gaps. Flows that can be run out of order, skipped, or replayed to reach a state the designer never intended.
  • Insufficient separation. A single tier trusted to enforce rules that a determined user can simply route around.
A design that trusts a client-supplied pricePOST /checkout { "item": "laptop", "price": "1.00" }
# server accepts the client's price instead of looking it up, a design flaw, not a bug
Why it's new: A04 exists because "shift left" only reaches so far. You can test code endlessly and still ship an insecure system if the threat model was never done. The category pushes security upstream, into design.

Designing securely

  • Threat-model early. Before building, ask what could go wrong with each flow and who benefits from abusing it. Document the trust boundaries.
  • Use a secure development lifecycle that includes design review as well as code review, with security involved from the requirements stage.
  • Write and reuse secure design patterns, a hardened authentication library, a vetted payment flow, rather than reinventing sensitive logic each time.
  • Enforce business rules server-side and never trust the client to be the only caller or an honest one.
  • Write abuse cases alongside use cases, and test that the system resists them as well as satisfying the happy path.

Insecure design is the hardest category to retrofit, because fixing it often means redesigning a live system rather than patching a line. The cheapest time to catch it is before anything is built, which makes the habit of asking "what did we assume, and who could break that assumption?" the most useful one this category teaches.

Primary source. A04:2021 : Insecure Design, OWASP.

Back to the knowledge baseRequest an assessment