-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
The Laravel application exposes its log file publicly at /storage/logs/laravel.log. This file may disclose sensitive error messages, file paths, stack traces, or even credentials posing a risk to the application's security posture.
Impact:
An attacker can access internal error logs and gain valuable information for further exploitation, such as:
- Application structure
- Internal IPs or paths
- Debug error or Stack Traces
Steps to Reproduce
1.Run the following Nuclei Template:
id: exposed-laravel-log
info:
name: Exposed Laravel Log File
author: kavinkumar0619
severity: medium
description: Identifies exposed Laravel log files located at /storage/logs/laravel.log. These files may disclose sensitive application errors, stack traces, environment paths, and debugging information, potentially aiding attackers in further exploitation.
tags: misconfiguration,laravel,logs,exposure
requests:
-
method: GET
path:- "{{BaseURL}}/storage/logs/laravel.log"
matchers-condition: and
matchers:-
type: status
status:- 200
-
type: word
words:- "[stacktrace]"
- "production.ERROR"
- "local.ERROR"
- "Illuminate\"
part: body
condition: or
2.If the endpoint is exposed, the output will confirm a match
[exposed-laravel-log] [http] [medium] https:///storage/logs/laravel.log
3.You can also manually verify by opening the URL in a browser:
https:///storage/logs/laravel.log
POC:
