A guest user on your public site was able to read other customers' cases. How did that happen and how do you fix it?
Your confidence:Not rated
Model answer
Likely causes
- A guest-accessible Apex method (
@AuraEnabledin a class the guest profile can access) declaredwithout sharingand returning records by an ID or search term supplied by the caller. - A guest sharing rule that's too broad, or object permissions on the guest profile that shouldn't exist.
Contain: remove the guest profile's access to the class or object immediately; consider taking the page offline.
Investigate: Event Monitoring or site logs for what was accessed; determine affected customers (may be a reportable data breach under privacy law).
Fix
- Guest methods use
with sharingand user mode; they never return records based on caller-supplied IDs without verification. - Remove unnecessary guest object permissions; keep guest sharing rules minimal and read-only.
- Require authentication for any personal data; guests get only public information or submit forms.
Prevent: review all guest-accessible classes in CI (Code Analyzer rules), run periodic guest access reviews, and include site security in release checklists.
โ Key points to hit
โ Red-flag answers
- Blaming the platform
- Fixing only the one method without a review
- Ignoring breach notification obligations
โช Follow-ups
Can guests own records they create?
No. Records created by guests are assigned to a default internal owner, so guests can't see them again unless explicitly shared, which is intentional.
How would you let customers check case status without logging in?
Prefer login. If unavoidable, require a case reference plus a second factor (for example an emailed code), and return only status text via a tightly scoped method.