Broken Access Control is consistently the #1 web risk on the OWASP Top 10. It's about users doing things they shouldn't be allowed to do.
GET /api/invoices/1001 ← your invoice
GET /api/invoices/1002 ← someone else's — and the server returns it!
The app checks that you're logged in but not that the object belongs to you. Always verify authorization on every request, server-side, scoped to the current user.
A regular user calls an admin-only endpoint (POST /api/admin/deleteUser) directly. The UI hid the button, but the API didn't enforce the role. The server must enforce authorization — never rely on a hidden UI.
Weak authentication lets attackers become legitimate users.
| Weakness | Fix |
|---|---|
| Weak/credential-stuffed passwords | Strong policy + breached-password check + MFA |
| Brute-force allowed | Rate limiting, account lockout, CAPTCHA |
| Session IDs in URL / no expiry | Secure cookies, short timeouts, rotation on login |
| No re-auth for sensitive actions | Step-up authentication |
HttpOnly, Secure, SameSite.MFA combines factors from different categories:
| Factor | Example |
|---|---|
| Something you know | Password, PIN |
| Something you have | Phone, security key |
| Something you are | Fingerprint, face |
MFA stops the vast majority of account-takeover attacks even when passwords leak. Prefer phishing-resistant factors (FIDO2/WebAuthn hardware keys) over SMS, which is vulnerable to SIM-swapping.