Least Privilege and Privacy by Default are the principles that stop this from happening. They are not ideals. They are rules. They cut attack surfaces to the bone. They limit what processes, users, and services can touch—down to the smallest permission.
Least Privilege means every identity gets only the rights it needs to do its job. No more. No hidden admin tokens. No blind trust in internal traffic. It applies to humans, APIs, containers, and microservices. If a function only reads data, it should not have write access. If a service only posts events, it should not have database permissions.
Privacy by Default means every new feature, endpoint, or dataset starts closed. Access is denied until explicitly granted. Data collection is minimal. Sensitive fields are masked or encrypted by default. Storage lifetimes are short unless extended for a clear reason. This is proactive security—control before exposure, not after breach.