ΣύνδεσηΕγγραφή
A06 · 2025

Insecure Design

The feature itself is unsafe, even if the code has no bugs.

What it is

Some problems are in the plan, not the code: a password reset with no rate limit, a coupon that can be applied twice, a security question anyone can look up. Fixing a typo won't help. The flow has to change.

What can happen

Example: Login without a limit

✕ Vulnerable
// Unlimited tries: a 6-digit code falls in minutes.
router.post("/login", loginHandler);
✓ Fixed
import rateLimit from "express-rate-limit";

const loginLimiter = rateLimit({
  windowMs: 15 * 60 * 1000, // 15 minutes
  limit: 10,                // per IP
});

router.post("/login", loginLimiter, loginHandler);

Ask "what if someone does this 10,000 times?" for every feature while you design it.

How to prevent it

What CrimsonScan checks

Needs a code review

Not detectable automatically. Design flaws need a human to review the flow. CrimsonScan's own rate limits and one-active-scan rule are examples of design-level fixes.

Read more on owasp.org ↗