Developer Finds Silent Multi-Tenant Bug That Unsubscribed Wrong Customers on Bounce
A software developer discovered a critical bug in a self-built multi-tenant email service where a bounce webhook handler incorrectly unsubscribed contacts across all tenants sharing the same email address. The flaw existed in the bounce-handling logic, which matched contacts by email address alone without filtering by customer ID, violating multi-tenant data isolation. Because the Contact table intentionally allows the same email to exist under different customers, a single bounce event could silently remove subscribers belonging to unrelated businesses. The bug evaded all automated tests and multiple code review passes, including a dedicated security review, making it particularly difficult to detect. The developer documented the issue as Part 3 of an ongoing series on building a multi-tenant email service using FastAPI and Resend.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in