SiteShadow
Back to vulnerability library

CWE-863 Incorrect Authorization

What this means

SiteShadow flagged an authorization check that appears missing or incorrect. Authentication answers "who are you," authorization answers "are you allowed to do this."

Why it matters

Incorrect authorization can lead to privilege escalation.

Safer examples

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

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

2) Use centralized policies/guards

Don't scatter checks across handlers; use middleware/policy functions.

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

Add integration tests that attempt access with a different user and assert 403/404.

How SiteShadow detects it (high level)

References

---

← Back to Vulnerability Library

Request access View coverage