Prompt

Why is my permissions-aware search leaking docs I shouldn't see?

Artificial Intelligence / AI Search1 observationLast seen Oct 31, 2026

Latest observation

Oct 31, 2026OpenAI APIWeb search: off

Most “permissions-aware” search leaks come from one of a few places where filtering and ranking happen in the wrong order or not on the same source of truth.

Common causes

  1. You search first, filter later

    • If the index returns top matches and you only apply ACL checks afterward, you can still leak:
      • document titles/snippets
      • IDs
      • counts / total hits
      • facets / aggregations
    • Worse, if you paginate, you may expose “missing” docs indirectly.
  2. ACLs are stale or denormalized

    • Your search index may have old permissions.
    • Example: doc was revoked, but the index still says user can see it.
    • This is common when permissions are stored in a separate system and synced asynchronously.
  3. Filtering on the wrong identity

    • You may be using:
      • user ID when you should use group/team/org memberships
      • tenant ID incorrectly
      • “role” claims from an untrusted token
    • A small mismatch in auth context can open access.
  4. Partial permission expansion

    • If access is based on group membership, but you only expand some groups:
      • nested groups
      • inherited roles
      • dynamic teams
      • sharing rules
    • then the search filter may be incomplete.
  5. Query cache or result cache is cross-user

    • Cached search results reused across users without including auth context in the cache key.
    • This can leak full result sets or snippets.
  6. Aggregations/facets ignore ACLs

    • Even if document hits are filtered, counts can reveal restricted docs exist.
    • Examples:
      • “12 docs in Project X” when user should only know 3
      • terms facets that expose sensitive categories
  7. Highlighting/snippets pulled from unfiltered docs

    • Search engine generates highlighted text before permission enforcement.
    • That can expose sensitive terms from unauthorized docs.
  8. Multi-tenant boundaries are soft

    • Missing tenant filter in one code path or one index alias.
    • “Admin” or “superuser” paths may accidentally be used for normal users.
  9. Race conditions

    • Permissions changed between:
      • indexing
      • query time
      • post-filtering
    • The doc can slip through briefly.
  10. Bad document-level security implementation

  • Inverted index / ACL tokens not applied consistently.
  • Example: readers: [user123, groupA] but query only checks user123.

How to diagnose quickly

  • Inspect one leaked doc and answer:

    1. Was it already in the index?
    2. Did the search engine return it, or did your app attach it later?
    3. Is the ACL field correct at query time?
    4. Are snippets/facets/counts leaking even if the doc itself is removed?
    5. Is the cache keyed by auth context?
  • Log the following for a test user:

    • user/tenant ID
    • group memberships used
    • final search filter
    • raw search hits before app filtering
    • post-filter hits
    • aggregations/facets returned

Safer patterns

  • Enforce ACLs in the search layer, not only after retrieval.
  • Include auth context in caches.
  • Use a single authoritative permission model for both app and index.
  • Index permission tokens carefully and reindex on permission changes.
  • Hide counts/facets/highlights unless they’re also permission-filtered.
  • Test with “negative” cases:
    • revoked access
    • group removal
    • tenant boundary
    • nested group membership
    • stale index entries

If you want, I can help you debug this with your setup.

Send me:

  • search engine (Elasticsearch/OpenSearch/Solr/DB/etc.)
  • how ACLs are modeled
  • whether you filter at query time or post-query
  • an example query and an example leaked doc

and I can narrow down the likely leak path.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.