How to fix: Framework Error Message Exposed
A raw PHP, .NET, Django, MySQL, or PostgreSQL error message was found in the response.
Why it matters
Reveals internal file paths, stack traces, and technology details that help an attacker map the application; when the error is database-related it can also reveal schema details.
Uncaught framework exceptions and raw database errors expose internal implementation details that should never reach an end user.
How to fix it
- 1Use custom error pages, log errors server-side.
Code examples
Return generic errors to clients
try {
const result = await riskyOperation();
return Response.json(result);
} catch (err) {
console.error("Operation failed:", err); // detailed log server-side
return Response.json(
{ error: "An unexpected error occurred" },
{ status: 500 }
);
// Never return err.message, stack traces, or SQL errors to the client
}References
Detected automatically by VulnRadar. The check id is exposed-error-messages, stable across every scan so you can filter or diff on it.
More content checks
- MediumPotential Open Redirect Parameters
- HighDirectory Listing Appears Enabled
- MediumSensitive File References Detected
- HighPotentially Outdated JavaScript Libraries
- Inforobots.txt Present - Review Manually
- InfoCMS / Technology Fingerprinting
- MediumPotentially Dangerous Inline JavaScript
- LowServer version disclosed in response header
Questions
- How severe is Framework Error Message Exposed?
- VulnRadar rates this high severity in the content category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id exposed-error-messages, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Framework Error Message Exposed map to?
- It maps to CWE-209. In the OWASP Top 10 it falls under A05:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.