ankur@sec:~$

$ cat owasp/a10.md

A10:2025

Mishandling of Exceptional Conditions

When something unexpected happens, the app leaks information, crashes, or fails open.

## 1 · why it happens

New in 2025. Developers write the happy path; attackers live in the error paths. An unexpected type, a missing field or a timeout can produce a stack trace, skip a security check, or leave a transaction half-done.

Errors are also one of the richest OSINT sources: a single stack trace can reveal the framework, its version, file paths, database type and internal hostnames.

# JavaScript

✗ vulnerable
async function canAccess(user, doc) {
  try {
    return await policyService.check(user, doc);
  } catch (e) {
    return true;   // fail open: policy service down = everyone allowed
  }
}
✓ fixed
async function canAccess(user, doc) {
  try {
    return await policyService.check(user, doc);
  } catch (e) {
    logger.error({ event: 'policy_check_failed', err: e.message });
    return false;  // fail closed
  }
}

# C#

✗ vulnerable
catch (Exception ex)
{
    return StatusCode(500, ex.ToString()); // stack trace, paths, SQL
}
✓ fixed
catch (Exception ex)
{
    _logger.LogError(ex, "Order failed {OrderId}", id);
    return Problem("Something went wrong.", statusCode: 500);
}

## 2 · how attackers find it from outside

public sourcewhat it tells them
Search enginesIndexed error pages and stack traces from your site.
Wayback MachineOld error pages captured before you fixed them - the versions may still be the same.
Your own appSend a single quote, an array instead of a string, or an empty body - what comes back?

→ all OSINT sources · run them on yourself

## 3 · how it's abused

⚠ Recon your own assets, or targets you have written permission to test. Passive OSINT reads public data, but using it to target someone else's systems can still be illegal or against their terms. Examples on this site use example.com placeholders.

'

A single quote often triggers a database error that reveals the query and the database type.

id[]=1

Sending an array where a string is expected often crashes code paths nobody tested.

%00

A null byte can break parsing and expose an unhandled exception.

Payload examples adapted from PayloadsAllTheThings (MIT, © Swissky). Full lists:Hidden Parameters

## 4 · fix

## 5 · detect

test it

ZAP

Open-source web app scanner and proxy. The baseline scan is safe for CI.

authorized targets only
map the surface

httpx

Which of your subdomains are alive, and what is running on them?

authorized targets only

Official description: OWASP A10:2025 Mishandling of Exceptional Conditions