Join our Newsletter — 33% off our NHI Course

How do developers prevent not using complete mediation?

Developers prevent incomplete mediation by checking every access to a protected resource, not only the first request or a cached decision. Revalidate permissions at each sensitive action, especially after role changes, token updates or state transitions. Without complete mediation, attackers can reuse stale authorisation and reach operations that should be blocked.

Why complete mediation matters in access control

complete mediation means every access to a protected resource is checked against current policy, not just the first time a user reaches it. That matters because permissions, session state, and object ownership can change after login. If the application trusts an earlier decision too long, stale authorisation can survive role changes, token refreshes, or workflow transitions.

Developers should treat each sensitive action as a fresh decision point. The check belongs where the resource is actually used, so a cached allow decision cannot silently outlive the context that made it valid. This is especially important for operations that change data, expose records, or invoke privileged functions.

Where incomplete mediation usually shows up

The most common failure is checking once at entry, then assuming the rest of the request stays safe. That breaks when later code paths load different records, reuse a session, or call a downstream service that was never re-authorised. It also appears when client-side state, hidden fields, or earlier validation are trusted as if they were still authoritative.

Another pattern is inconsistent enforcement across endpoints. One route may verify access correctly while another route, background job, or internal API skips the same check. That creates an authorisation gap even when the underlying business rule seems simple. The weakness is not the absence of a policy, it is the failure to apply the policy at every enforcement point.

For application teams, the practical lesson is to place the decision close to the protected object and the exact operation being performed. OWASP’s Cheat Sheet Series is a useful reference for implementing repeatable access checks, session handling, and other defensive patterns that reduce this kind of drift.

How to design checks so stale access cannot slip through

Re-check permissions whenever the state that justifies access can change. That includes role updates, account suspension, group membership changes, token replacement, privilege elevation, object reassignment, and any transition that changes who should be allowed to act. The rule should be evaluated against the current server-side state, not only against a prior client assertion or cached verdict.

Use the protected resource, not the caller, as the anchor for the decision. If the action concerns a specific record, workflow step, or sensitive operation, the check should confirm that this actor may perform that exact action on that exact target right now. This reduces the chance that a general “logged in” state gets mistaken for valid permission.

Keep the check in the same trust boundary as the resource enforcement. When a front end, API gateway, or middleware layer performs the only check, later code can accidentally bypass it. Centralising policy logic is useful, but the final enforcement still has to happen at each access point that can change or reveal protected data.

Risk and Threat Considerations

Incomplete mediation creates an authorisation bypass condition. An attacker does not need to defeat the first access check if they can reuse an old allow decision, exploit a state transition, or reach a secondary path where the same resource is not revalidated.

Failure mechanism: A permission decision is made once and then reused after the underlying user, role, session, or object state has changed, so later actions inherit access that should no longer exist.

Impact: Sensitive data exposure, unauthorised modification, privilege abuse, and lateral movement through business functions can follow when stale authorisation is accepted as current.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP ASVS, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP ASVS V8 — Authorization Complete mediation is an authorization enforcement problem on protected actions.
Recommendation — Enforce authorization at each sensitive request and recheck access when state changes.
NIST SP 800-53 Rev 5 AC-3 — Access Enforcement The subject is enforcing access decisions at every protected resource touchpoint.
IA-5 — Authenticator Management Stale tokens and session state can keep old access alive after changes.
Recommendation — Apply access enforcement at the resource and reject requests that fail current policy. Rotate and revoke authenticators and related credentials when access state changes.
CIS Controls v8 CIS-6 — Access Control Management The question concerns preventing stale or incomplete authorization across access paths.
Recommendation — Review and enforce access rights across all applications and sensitive workflows.

Practitioner Guidance

What to verify: Confirm that every sensitive endpoint, method, and workflow step performs an enforcement check at the point of use. Test not just the primary request path, but also alternate routes, retries, asynchronous jobs, and any code path that can load or mutate the same protected object.

Common mistake: Teams often rely on a session login, a gateway decision, or a single “access granted” flag and then forget to re-evaluate when roles or object ownership change. That shortcut usually fails first in long-lived sessions and complex business workflows.

Decision rule: If a change in role, token, ownership, or workflow state could alter access, revalidate before each sensitive action. If the action can cause material impact, do not depend on a prior allow decision alone.

Practitioner takeaway: Complete mediation is less about adding one more check and more about eliminating any place where an earlier decision can outlive the state it depended on.