Neither attack exploits a bug in the application’s business logic. Both exploit the absence of a control that should have been present. In Pattern 1, the application logic is correct — it just has the wrong CORS policy. In Pattern 2, the endpoint works as designed — it just shouldn’t be reachable without authentication. The fix in each case is a configuration change, not a code change.