Skip to content

fix(events): reject cross-tenant contact and email IDs on event tracking - #450

Merged
driaug merged 1 commit into
nextfrom
fix/cross-tenant-event-track-idor
Aug 9, 2026
Merged

fix(events): reject cross-tenant contact and email IDs on event tracking#450
driaug merged 1 commit into
nextfrom
fix/cross-tenant-event-track-idor

Conversation

@driaug

@driaug driaug commented Aug 9, 2026

Copy link
Copy Markdown
Member

POST /events/track passed the client-supplied contactId straight through to EventService.trackEvent, which started workflow executions for that contact without checking it belonged to the authenticated project. On multi-tenant installs this let one project run its workflows (emails, webhooks, contact field updates) against another project's contacts. The event row was also stored with the foreign contactId, so GET /events returned the other project's contact email in its contact join.

Validate both IDs against the authenticated project in the controller, and verify contact.projectId === workflow.projectId in startWorkflowForContact as defense in depth for every other caller of trackEvent.

POST /events/track passed the client-supplied contactId straight through to
EventService.trackEvent, which started workflow executions for that contact
without checking it belonged to the authenticated project. On multi-tenant
installs this let one project run its workflows (emails, webhooks, contact
field updates) against another project's contacts. The event row was also
stored with the foreign contactId, so GET /events returned the other
project's contact email in its contact join.

Validate both IDs against the authenticated project in the controller, and
verify contact.projectId === workflow.projectId in startWorkflowForContact
as defense in depth for every other caller of trackEvent.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@driaug
driaug merged commit 7aad5de into next Aug 9, 2026
5 checks passed
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