SiteShadow
Back to vulnerability library

CWE-286 Incorrect Authorization

What this means

SiteShadow flagged an authorization check that is missing, incomplete, or applied in the wrong place. Authorization is "are you allowed to do this?" (not just "are you logged in?").

Why it matters

Incorrect authorization can expose protected data or actions.

Safer examples

1) Enforce object-level authorization (ownership/policy)

doc = get_doc(doc_id)
if doc.owner_id != current_user.id:
    raise PermissionError("Forbidden")

2) Centralize authorization checks

Use policy functions/middleware so every route follows the same rules.

3) Test "can't access others' data"

Add integration tests that try another user's ID and assert 403/404.

How SiteShadow detects it (high level)

References

---

← Back to Vulnerability Library

Request access View coverage