Vulnerability Assessment Report
1. Vulnerability Title
Information Disclosure via Verbose Error Messages
2. Severity
3. Vulnerability Type
- Information Disclosure
- Security Misconfiguration
4. Affected Component
- • Public API endpoints
- • Invalid or non-existent routes
5. Description
The application exposes detailed internal error information when an invalid API route or malformed path is requested.
The error response includes full server file paths, framework internals, middleware stack, and execution traces. This behavior allows an attacker to gain sensitive information about the server environment, application structure, and underlying framework.
6. Proof of Concept (PoC)
GET /home/myqbits/api.myqbits.com/vendor/laravel/framework/src/Illuminate/Routing/Router.php- • Full internal server paths
- • Laravel framework file locations
- • Stack trace details
- • Middleware execution order
Example path exposed:
/home/myqbits/api.myqbits.com/vendor/laravel/framework/
7. Impact
An attacker can leverage this information to:
- • Identify the backend framework (Laravel)
- • Perform framework-specific attacks
- • Target known vulnerabilities (CVEs)
- • Map internal directory structure
- • Assist in Local File Inclusion (LFI) or Remote Code Execution (RCE) reconnaissance
This significantly increases the risk of further exploitation.
8. Root Cause
- • Debug mode enabled in production environment (APP_DEBUG=true)
- • Default exception handler returning verbose error details
- • Lack of API-specific error sanitization
9. Recommendation / Remediation
APP_ENV=production
APP_DEBUG=false- • Implement a custom API-safe exception handler
- • Return generic error messages for all client-facing API responses
- • Log detailed errors internally only
- • Never expose stack traces or file paths in production
- • Use centralized error handling for APIs
- • Apply rate limiting on invalid routes
- • Regularly audit error responses
10. Expected Secure Behavior
For invalid routes, the API should respond with a minimal message:
{
"success": false,
"message": "Endpoint not found"
}No internal details should be exposed.
11. Conclusion
This vulnerability represents a high-risk information disclosure issue that can significantly aid attackers during reconnaissance.
Immediate remediation is strongly recommended to prevent further exploitation.