# Stale authorization after revocation or demotion

Cached roles, tokens, memberships or sessions not refreshed when a user is removed or downgraded

_Area: Web access control and IDOR. Seen in 16 disclosed reports; 6 confirmed bounties, median $763, range $200-$3,000; latest 2026-10-29. Updated 2026-11-14._

## How it works
An authorization decision is made once and then reused after the facts behind it change. A role is snapshotted at connect, a token is minted per share, a foreign key is left behind on delete, or a cleanup hook fires only on one kind of change. The assumption that breaks is "the stored grant still reflects current membership." When the grant is read from a cache, a persisted association, or a token instead of re-derived from the current record, removal or demotion never reaches the check, and the old privilege keeps working.

## Where it shows up
- Realtime layers that snapshot identity/role at handshake (Socket.IO, WebSocket, CRDT sync) and authorize later calls against the snapshot [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-45m8-cpm2-3v65.md)[E6](https://bugbountylibrary.com/r/h1%3A3852102.md)
- Delete/revoke paths that clear one piece of state but not a related membership set or foreign key [E1](https://bugbountylibrary.com/r/h1%3A819821.md)[E4](https://bugbountylibrary.com/r/ghsa%3AGHSA-f2g3-hh2r-cwgc.md)
- Per-share link tokens rather than per-recipient credentials [E7](https://bugbountylibrary.com/r/h1%3A673724.md)
- Cleanup/redaction hooks wired to membership deletion but not to role downgrade [E8](https://bugbountylibrary.com/r/h1%3A880863.md)
- "Info" GraphQL/RPC responses carrying tokens the UI never shows [E2](https://bugbountylibrary.com/r/h1%3A700831.md)[E5](https://bugbountylibrary.com/r/blog%3Aweb-archive-org-web-20221201043429-https-hopesamples-blogspot-com-2022-11-the-space-creators-can-still-see-html.md)
- Caches that split shared state from per-repo/per-user membership state [E4](https://bugbountylibrary.com/r/ghsa%3AGHSA-f2g3-hh2r-cwgc.md)

## How to review
Find every place authorization reads a cached, persisted, or token-derived value, and check that the value is invalidated on every mutation that should revoke it: removal, downgrade, delete, and peer activity. The invariant: after any membership or role change, the next authorization decision must reflect the current record, not a prior snapshot. Diff the realtime/socket authorization callsites against the HTTP path that refetches from the DB [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-45m8-cpm2-3v65.md). For each Clear/Delete path, confirm it removes both shared state and membership state [E4](https://bugbountylibrary.com/r/ghsa%3AGHSA-f2g3-hh2r-cwgc.md). For tokens, confirm revocation actually invalidates the token, not just the account [E7](https://bugbountylibrary.com/r/h1%3A673724.md). Distinguish removal from downgrade when testing cleanup hooks [E8](https://bugbountylibrary.com/r/h1%3A880863.md).

## How finders spotted it
- Read the allow-list builder and noticed it included a persisted association even when the parent object was gone, contradicting documented behavior [E1](https://bugbountylibrary.com/r/h1%3A819821.md)
- Read every JS file and request/response; spotted a GraphQL info query returning a token the UI never displayed [E2](https://bugbountylibrary.com/r/h1%3A700831.md)
- Compared socket handlers (cached role) against HTTP handlers (DB refetch), isolating the gap to the cache [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-45m8-cpm2-3v65.md)
- Traced the delete path through each Clear call and noticed membership checked but never pruned [E4](https://bugbountylibrary.com/r/ghsa%3AGHSA-f2g3-hh2r-cwgc.md)
- Observed the member-list RPC keyed by space ID, then replayed it after removal [E5](https://bugbountylibrary.com/r/blog%3Aweb-archive-org-web-20221201043429-https-hopesamples-blogspot-com-2022-11-the-space-creators-can-still-see-html.md)
- Captured the sync request, tested across revocation, saw 403 flip back to 200 after a peer interaction [E6](https://bugbountylibrary.com/r/h1%3A3852102.md)
- Noticed a per-share link token, then tested whether removing the recipient revoked it [E7](https://bugbountylibrary.com/r/h1%3A673724.md)
- Noticed redaction stopped firing after the grace period and tested downgrade versus removal [E8](https://bugbountylibrary.com/r/h1%3A880863.md)

## Variants seen
- Stale foreign key on a deleted parent object [E1](https://bugbountylibrary.com/r/h1%3A819821.md)
- App-scoped token not revoked on staff removal [E2](https://bugbountylibrary.com/r/h1%3A700831.md)
- Role snapshotted in a session pool, never refreshed [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-45m8-cpm2-3v65.md)
- Cache membership set never pruned, revived by peer repopulation [E4](https://bugbountylibrary.com/r/ghsa%3AGHSA-f2g3-hh2r-cwgc.md)
- Historical creator role trusted over current membership [E5](https://bugbountylibrary.com/r/blog%3Aweb-archive-org-web-20221201043429-https-hopesamples-blogspot-com-2022-11-the-space-creators-can-still-see-html.md)
- Stale token revived by unrelated peer activity [E6](https://bugbountylibrary.com/r/h1%3A3852102.md)
- Per-share link token surviving recipient removal [E7](https://bugbountylibrary.com/r/h1%3A673724.md)
- Redaction hook firing on removal but not downgrade [E8](https://bugbountylibrary.com/r/h1%3A880863.md)

## Why fixes fail
Redaction was previously fixed but only for removal, so downgrade regressed [E8](https://bugbountylibrary.com/r/h1%3A880863.md).

## Impact and severity
Reached full read/write store access [E2](https://bugbountylibrary.com/r/h1%3A700831.md), persistent backdoor push channels [E1](https://bugbountylibrary.com/r/h1%3A819821.md), cross-user note access after demotion and deletion [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-45m8-cpm2-3v65.md), confidential issue/MR reads [E8](https://bugbountylibrary.com/r/h1%3A880863.md), and member PII exposure [E5](https://bugbountylibrary.com/r/blog%3Aweb-archive-org-web-20221201043429-https-hopesamples-blogspot-com-2022-11-the-space-creators-can-still-see-html.md). Severity rose where the stale grant survived full deletion [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-45m8-cpm2-3v65.md), extended indefinitely via heartbeats [E3](https://bugbountylibrary.com/r/ghsa%3AGHSA-45m8-cpm2-3v65.md), or bypassed a separate policy like forced passwords [E7](https://bugbountylibrary.com/r/h1%3A673724.md). Median bounty 763 across 16 reports.

## Seen in real software
Open-source packages and projects, and products, where this pattern was found. If the target runs one, compare the version it runs with the fix.
- **open-webui (pip)** <= 0.8.12, fixed in 0.9.0: Open WebUI: Stale Admin Role in Socket.IO Session Pool Enables Post-Demotion Cross-User Note Access (CVE-2026-44553). Report: https://bugbountylibrary.com/r/ghsa%3AGHSA-45m8-cpm2-3v65.md
- **github.com/distribution/distribution/v3 (go)** < 3.1.0, fixed in 3.1.0: Distribution: stale blob access resurrection via repo-scoped redis descriptor cache invalidation (CVE-2026-35172). Report: https://bugbountylibrary.com/r/ghsa%3AGHSA-f2g3-hh2r-cwgc.md. Fix: https://github.com/distribution/distribution/commit/078b0783f239b4115d1a979e66f08832084e9d1d
- **GitLab**: Todos are not redacted when membership changes - Access to (confidential) issues and merge requests. Report: https://bugbountylibrary.com/r/h1%3A880863.md
- **GitLab**: Members from parent group keep their access level on a subgroup transfer and are invisible. Report: https://bugbountylibrary.com/r/h1%3A790786.md
- **GitLab**: Initial mirror user can be assigned by other user even if the mirror was removed. Report: https://bugbountylibrary.com/r/h1%3A819821.md
- **Nextcloud**: Circle email-members have still access to a shared folder/file after they are removed from the circle (CVE-2019-15610). Report: https://bugbountylibrary.com/r/h1%3A673724.md
- 1 more in [components.md](https://bugbountylibrary.com/skills/components.md).

## Evidence
- E1: https://bugbountylibrary.com/r/h1%3A819821.md
- E2: https://bugbountylibrary.com/r/h1%3A700831.md
- E3: https://bugbountylibrary.com/r/ghsa%3AGHSA-45m8-cpm2-3v65.md
- E4: https://bugbountylibrary.com/r/ghsa%3AGHSA-f2g3-hh2r-cwgc.md
- E5: https://bugbountylibrary.com/r/blog%3Aweb-archive-org-web-20221201043429-https-hopesamples-blogspot-com-2022-11-the-space-creators-can-still-see-html.md
- E6: https://bugbountylibrary.com/r/h1%3A3852102.md
- E7: https://bugbountylibrary.com/r/h1%3A673724.md
- E8: https://bugbountylibrary.com/r/h1%3A880863.md
