Skip to content

[upstream #17033] 17033: Tenantless account erasure runs ID-keyed cleanup without a tenant predicate #357

Closed

Description

@berry-13

Found while reviewing LibreChat-AI#17033 (Codex finding LibreChat-AI#17033 (comment)). When a user document has no tenantId (legacy, pre-tenancy), account erasure runs without a tenant filter: the CLI uses runAsSystem, and the self-service request has no tenant context in non-strict mode. ID-keyed cleanup (deleteUserAgents handoff edges and favorites by agent id, processDeleteRequest metadata and agent references by file_id) can then touch a record in a real tenant that reuses the same id, since agent ids are unique only by { id, tenantId } and file_id is not unique. It requires a deliberate id collision across tenants and reproduces on dev for self-service deletion. Use explicit no-tenant predicates (tenantId: { $exists: false }) for these operations when the deleted user has no tenant.

Activity

  1. added
    bugSomething isn't working
    area: apireviewctl followups state
    fixedreviewctl followups state
    and removed on Oct 14, 2026
  2. berry-13 commented on Oct 15, 2026

    @berry-13
    OwnerAuthor

    Closed by reviewctl followups sync: fixed on the root PR itself at 141547a, merged on 2026-10-14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: apireviewctl followups statearea: packagesreviewctl followups statebugSomething isn't workingfixedreviewctl followups state

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions