Right-to-erasure removes or anonymizes all PII within documented window
Why it matters
GDPR Art. 17 and CCPA §1798.105 grant users the right to erasure — setting an is_deleted flag satisfies neither. Name, email, profile picture, and bio left in the database after a deletion request remain queryable by anyone with direct database access, exploitable via SQL injection (CWE-212), and constitute a reportable breach under GDPR Art. 83. Regulators have levied fines for exactly this pattern: data nominally 'deleted' but fully intact in the store.
Severity rationale
Critical because retained PII after deletion directly violates GDPR Art. 17 and exposes the platform to regulatory fines and breach liability if that data is subsequently leaked.
Remediation
Implement erasure at the database layer — either cascade-delete PII columns or replace them with an anonymized placeholder on the user row. Update all derived tables (social graph, activity logs) in the same transaction to prevent orphaned references. Example anonymization trigger:
CREATE FUNCTION anonymize_user_on_delete() RETURNS TRIGGER AS $$
BEGIN
UPDATE users SET
email = NULL,
phone = NULL,
profile_picture_url = NULL,
bio = NULL,
first_name = 'Deleted',
last_name = 'User ' || OLD.id,
deleted_at = NOW()
WHERE id = OLD.id;
RETURN OLD;
END;
$$ LANGUAGE plpgsql;
CREATE TRIGGER user_deletion_trigger
BEFORE DELETE ON users
FOR EACH ROW EXECUTE FUNCTION anonymize_user_on_delete();
Document the deletion window (e.g., immediate vs. 30-day grace) in your privacy policy to satisfy the "documented window" requirement.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Community Privacy & Controls Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- gdpr · Art. 17 — Right to erasure ('right to be forgotten')
- ccpa · §1798.105 — Right to delete personal information
- cwe · CWE-212 — Improper Removal of Sensitive Information Before Storage or Transfer
- nist:rev5 · SI-12 — Information Management and Retention
- gdpr · Art. 83 — General conditions for imposing administrative fines
- soc2:2017 · C1.2 — Disposal of confidential information
- soc2:2017 · CC6.5 — Logical and physical protections over disposed assets
Taxons
History
- 2026-04-18·v1.0.0·Initial import from community-privacy-controls·automated
- 2026-07-06·v1.0.1·Add SOC 2 TSC mapping (C1.2, CC6.5) from the verified compliance crosswalk register (docs/compliance/).·by soc2-mapping-enrichment-ship-2