Skip to content
Skills Library
Security · Review & audit

stack-trace-exposure

/stack-trace-exposure

Use when reviewing error handling middleware, API route handlers, or server responses for security-sensitive information disclosure.

Licence
MIT
Last repository change
06.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 06.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when reviewing error handling middleware, API route handlers, or server responses for security-sensitive information disclosure.

Original author description

Use when reviewing error handling middleware, API route handlers, or server responses for security-sensitive information disclosure.

How it works

  1. Quick Reference
  2. Check
  3. Fix
  4. Explain
  5. Code Review
Original SKILL.md headings · 35 lines, 233 words
SKILL.md preview
---
name: stack-trace-exposure
description: "Use when reviewing error handling middleware, API route handlers, or server responses for security-sensitive information disclosure."
metadata:
  category: security
  priority: high
  difficulty: intermediate
  estimatedTime: "20"
  source: frontendchecklist.io
  url: https://frontendchecklist.io/rules/security/stack-trace-exposure
---

# Prevent stack trace exposure in production error responses

Stack traces reveal file paths, function names, library versions, and sometimes database schema or configuration details. An attacker uses this information to identify the exact version of a framework or ORM, look up known CVEs for that version, and craft a targeted exploit. OWASP lists "Security Logging and Monitoring Failures" (A09) as a top-10 risk partly because organisations often expose this information without realising it.

## Quick Reference

- Never return raw error objects or stack traces in API responses
- Log full error details server-side; send only a generic message to the client
- Use a central error handler to ensure consistent sanitisation across all routes
- Assign correlation IDs so support teams can match client-visible errors to server logs

## Check

Check whether production API error responses include stack traces, file paths, or internal implementation details.

## Fix

Implement a central error handler that logs full details server-side and returns only a sanitised, generic error message to the client.

## Explain

Explain what information stack traces reveal and how attackers use that information to identify and exploit vulnerabilities.

## Code Review

Review error handlers, catch blocks, and API response code. Flag any location where error.stack, error.message (raw), or internal paths are serialised directly into a response body.

---

For full implementation details, code examples, and framework-specific guidance,
see `references/rule.md`.

Rule page: https://frontendchecklist.io/rules/security/stack-trace-exposure
Files in this package (2)
  • SKILL.md 2 KB
  • references/rule.md 8 KB

Versions

The database has no other skills named stack-trace-exposure.

Database snapshot: 13.11.2026 · package version c088192d88e8 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100scanning-for-data-privacy-issues
    Scan for data privacy issues and sensitive information exposure. Use when reviewing data handling practices. Trigger with 'scan privacy issues', 'check sensitive data', or 'validate data protection'.
  • 100repo-security-scan
    Scans a repository for sensitive information and security vulnerabilities. Use when the user asks to "scan for security issues", "check for sensitive data", "repo security scan", "make sure this repo has no sensitive information", "security audit", "scan history for secrets", or…
  • 100scanning-for-data-privacy-issues
    Scan for data privacy issues and sensitive information exposure. Use when reviewing data handling practices. Trigger with 'scan privacy issues', 'check sensitive data', or 'validate data protection'.
  • 100security-auditor
    Audits repository security by analyzing current code and commit history for sensitive information leaks. Detects API keys, passwords, and credentials. Use for "보안 점검", "보안 감사", "security audit", "민감 정보 검사" requests.
  • 100error-handler-middleware
    Manage error handler middleware operations. Auto-activating skill for Backend Development. Triggers on: error handler middleware, error handler middleware Part of the Backend Development skill category. Use when working with error handler middleware functionality. Trigger with…
  • 100api-testing
    Write and run API tests with Vitest for endpoints, middleware, and integrations. Use when testing API functionality, request/response validation, or error handling.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.