-
-
Notifications
You must be signed in to change notification settings - Fork 161
Closed
Description
Problem Statement
Internal error messages and stack traces are returned directly to the client in case of server errors.
Description
- Exception messages and full stack traces are embedded directly into HTML responses.
- Internal implementation details leave the server trust boundary.
Example
| $responseData = '<strong>' . $e->getMessage() . '</strong><br>trace: ' . $e->getTraceAsString(); |
| $responseData = '<strong>' . $e->getMessage() . '</strong><br>trace: ' . $e->getTraceAsString(); |
Impact
- Disclosure of internal classes, file paths, and control flow.
- Easier analysis of the application architecture.
- Reduced effort for targeted follow-up attacks.
Mitigation
- Do not return exception messages or stack traces to clients.
- Use generic error messages in responses.
- Log detailed error information exclusively on the server side.
Copilot