SiteShadow
Back to vulnerability library
Detected byCWE-aware static analysis

CWE-286 Incorrect Authorization

Coverage: 6 rules in the SiteShadow rule registry target this CWE (registry v2.0.0). Regex 6 Also: Taint and heuristic analyzers may also detect related flows (see coverage for the authoritative list) Registry tagging shows intent, for sample-level behaviour and benchmarked gaps see known gaps.

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

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.