Mishandling of Exceptional Conditions happens when errors, edge cases, and failure states aren’t handled safely — a crashed check, a swallowed exception, or a fail-open default can let a transaction, an authorization check, or a security control silently pass instead of blocking. Try the interactive playground below to watch a wallet transfer bypass its authorization check when an error is mishandled, then see it fail safely instead.
OWASP Top 10 · 2025 · A10 — Mishandling of Exceptional Conditions
Every application eventually hits input it didn’t expect: a malformed field, a null value, a downstream service timing out. Mishandling of Exceptional Conditions happens when an app responds to that surprise by failing open — silently defaulting to a permissive, “allow anyway” state — instead of failing closed and safely denying the action. An error message is annoying. An error that quietly grants access is a vulnerability.
Interactive demo
null, DROP--, or leave Account ID blank — and watch how the two handling modes
react differently to the same internal exception.
Vulnerable vs. secure code
function authorizeTransfer(acct, amt) {
let authorized;
try {
authorized = checkPermissions(acct);
} catch (e) {
// exception swallowed —
// default to "allow" so the
// request doesn't fail
authorized = true;
}
return authorized; // bypassed!
}
function authorizeTransfer(acct, amt) {
let authorized;
try {
authorized = checkPermissions(acct);
} catch (e) {
// unexpected state —
// deny by default and
// record the failure
authorized = false;
logError(e);
}
return authorized; // safely denied
}
Why this matters
How to detect & fix
fail-closed — deny or block by default whenever a security-relevant check throws an unhandled exception.catch is a red flag.try/catch.