High severityPHPSensitive Data ExposureMEDIUM confidence
Exception Detail To Client
An exception message or stack trace is sent to the client (CWE-209).
Standards mapping
- OWASP Top 10
- A05:2021 - Security Misconfiguration
- OWASP ASVS
- V14.3.2 (L1)
Vulnerable vs. safe
Flagged by this check
echo $e->getMessage();Passes - the safe pattern
echo "An unexpected error occurred";Why it matters & how to fix it
An exception message or stack trace is sent to the client (CWE-209). Detailed errors leak file paths, queries, and internal state useful to an attacker. Log the exception server-side and return a generic error message with a correlation ID to the user.
References
Rule ID integsec-php-exception-detail-to-client - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- JavaScript / TypeScript - Sensitive Data ExposureError Stack In Response
- JavaScript / TypeScript - Sensitive Data ExposurePII PHI In Logs
- JavaScript / TypeScript - Sensitive Data ExposureSecret In Logs
- JavaScript / TypeScript - Sensitive Data ExposureSensitive Data Client Storage
- JavaScript / TypeScript - Sensitive Data ExposureSensitive Data In URL Query
- Python - Sensitive Data ExposureFlask Traceback In Response