Skip to content

Exposed Laravel Log File #12661

@kavinkumar0619

Description

@kavinkumar0619

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:

  1. Application structure
  2. Internal IPs or paths
  3. 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:

Image

Metadata

Metadata

Assignees

Labels

DoneReady to merge

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions