wstg-error-handling

Tests web applications for improper error handling and stack trace information disclosure.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill wstg-error-handling-maicongambini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wstg-error-handling
Source: https://github.com/MaiconGambini/opencode-harness-guide/tree/main/skills/wstg-error-handling
Command: npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill wstg-error-handling-maicongambini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Web applications frequently leak internal implementation details through verbose error messages, stack traces, and debug pages, giving attackers a map of the technology stack, file paths, and backend services. This Skill provides a structured methodology, based on OWASP WSTG v4.2 Section 4.8, to systematically identify and analyze these information disclosure weaknesses during penetration tests. ## Core Features & Use Cases - Improper Error Handling Testing (WSTG-ERRH-01): Trigger and analyze errors at the web server and application layers using malformed HTTP requests, type violations, parser-breaking payloads, and boundary values. - Stack Trace Detection (WSTG-ERRH-02): Force unhandled exceptions through type confusion, null references, deserialization failures, and content-type mismatches to expose debug output. - Vulnerability Pattern Catalog: Identify seven common misconfigurations including production debug mode, default server error pages, database error passthrough, and inconsistent microservice error formats. - Use Case: During a web application penetration test, fuzz every input point with targeted payloads, fingerprint distinct error formats to map backend microservices, and document stack trace leakage with remediation guidance for the client report. ## Quick Start Use the wstg-error-handling skill to test this web application for improper error handling and stack trace leakage.

Frequently Asked Questions about wstg-error-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test a web application for improper error handling?

Trigger errors at the web server layer with malformed HTTP requests and non-existent resources, then fuzz application input points with type violations, boundary values, and parser-breaking payloads. Analyze responses for stack traces, database errors, and version disclosure.

How to detect stack trace leakage in web applications?

Force unhandled exceptions using type confusion, null values for required parameters, malformed serialized objects, and content-type mismatches. Look for framework-specific trace formats like Python tracebacks, Java stack traces, or .NET error pages in responses.

What information do error messages leak to attackers?

Error messages can reveal the technology stack, framework and library versions, internal file paths, database table and column names, and microservice topology. Stack traces may also expose parameter values, connection strings, and exact code locations.

When should I not use error handling testing methodology?

Do not use it for general input validation testing (covered by WSTG-INPV), authentication error user enumeration (WSTG-IDENT), or error-based SQL injection (WSTG-INPV-05). It also does not apply to non-web protocols outside HTTP/HTTPS.

Why do automated scanners miss some error disclosure issues?

Scanners often only check HTTP status codes, missing errors hidden in 200 or 302 response bodies, HTML comments, or custom headers. Manual inspection of response bodies on unexpected input is essential for complete coverage.

How do I fix stack trace leakage in production applications?

Disable debug mode (DEBUG=False, NODE_ENV=production), configure framework production error handlers, and implement a global exception handler returning generic messages. Log full traces server-side only and add CI/CD regression tests asserting no trace indicators in responses.