SiteShadow
Back to vulnerability library
Detected byStatic analysis

B01 Business Logic Trust of Client

What this means

SiteShadow flagged code where the server is trusting client-provided values for security- or access-sensitive decisions (role, permissions, account state, limits, feature flags).

Why it matters

Attackers can manipulate client data to bypass business rules.

Safer examples

1) Recompute sensitive values on the server

// Client sends: { action: "export" }
const action = req.body.action;
const policy = serverPolicy[action];      // server source of truth
assertAllowed(req.user, policy);          // server-side authorization

2) Enforce allowed state transitions server-side

allowed = {
  "draft": {"submitted"},
  "submitted": {"approved", "rejected"},
}
if new_state not in allowed[old_state]:
    raise PermissionError("Invalid transition")

3) Use allowlists/DTOs for updatable fields

Only allow safe fields to be set by the client. Everything else is server-controlled (see API01).

How SiteShadow detects it (high level)

References

---

← Back to Vulnerability Library

Catch this in your code with SiteShadow.

Every released SiteShadow scanner is free, including full project analysis, reports, patterns, dashboard access, and configured organization SSO.