Skip to content

Fix privilege escalation allowing granted users to delete collections#12

Draft
cursor[bot] wants to merge 2 commits intomainfrom
cursor/critical-bug-inspection-77cf
Draft

Fix privilege escalation allowing granted users to delete collections#12
cursor[bot] wants to merge 2 commits intomainfrom
cursor/critical-bug-inspection-77cf

Conversation

@cursor
Copy link
Copy Markdown

@cursor cursor bot commented Apr 7, 2026

Summary

  • identified a critical authorization regression introduced in recent collection-access changes
  • restricted collection rename/delete permissions to owner and creator only
  • added a regression test for canRenameOrDeleteCollection to ensure grant users cannot perform destructive collection operations
  • adjusted the test to mock Prisma so it runs in CI without DB env setup

Validation

  • npm test -- src/server/access/collections.test.ts
  • npm test

Impact

This prevents granted (shared) users from deleting or renaming entire collections, which could otherwise cause destructive data loss for other users.

Open in Web View Automation 

cursoragent and others added 2 commits April 7, 2026 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant