Improper Error Handling Pentesting Checklist
Error Response Discovery
- Identify all application endpoints and parameters.
- Send malformed requests to normal endpoints.
- Remove required parameters.
- Add unexpected parameters.
- Send empty parameter values.
- Send null values where applicable.
- Send excessively long parameter values.
- Send unexpected data types.
- Send arrays where strings are expected.
- Send objects where primitive values are expected.
- Send negative numbers.
- Send extremely large numbers.
- Send floating-point values where integers are expected.
- Send invalid Boolean representations.
- Send malformed JSON.
- Send malformed XML.
- Send malformed form-data.
- Send incomplete multipart requests.
- Send invalid URL/URI values.
- Send invalid date/time formats.
HTTP-Level Exception Handling
- Test unsupported HTTP methods.
- Test unexpected HTTP methods on authenticated endpoints.
- Test malformed HTTP headers.
- Remove required headers.
- Duplicate security-sensitive headers.
- Send invalid Content-Type.
- Send mismatched Content-Type and request body.
- Send invalid Accept headers.
- Test malformed Authorization headers.
- Test expired authentication tokens.
- Test structurally invalid tokens.
- Test requests with missing cookies.
- Test malformed cookies.
- Test oversized cookies.
- Test invalid Origin values.
- Test malformed Referer values.
- Test invalid Host handling where authorized.
- Test unsupported content encodings.
- Test malformed chunked requests where applicable.
- Check whether errors consistently return appropriate HTTP status codes.
Information Disclosure Through Errors
- Search responses for stack traces.
- Search for exception class names.
- Search for framework names and versions.
- Search for library names and versions.
- Look for source-code snippets.
- Look for source-code file paths.
- Look for internal class names.
- Look for method/function names.
- Look for database table names.
- Look for database column names.
- Look for SQL queries.
- Look for filesystem paths.
- Look for internal IP addresses.
- Look for internal hostnames.
- Look for usernames/service accounts.
- Look for environment variables.
- Look for configuration values.
- Look for cloud resource identifiers.
- Look for debugging information.
- Look for request IDs that expose internal implementation details.
Database Exception Handling
- Submit invalid database-related input.
- Test type mismatches that reach database operations.
- Test invalid identifiers.
- Test invalid sorting/filtering parameters.
- Test invalid pagination values.
- Test duplicate values where uniqueness is expected.
- Trigger constraint violations.
- Test malformed database query parameters.
- Check for SQL/database error messages.
- Identify database engine information.
- Check whether failed transactions expose sensitive information.
- Check whether database exceptions return different responses for different users.