2020-05-24 02:44:48 +00:00
|
|
|
id: laravel-env
|
2020-05-23 18:09:25 +00:00
|
|
|
|
|
|
|
info:
|
2021-04-11 14:35:07 +00:00
|
|
|
name: Laravel .env file accessible
|
2021-08-09 10:39:41 +00:00
|
|
|
author: pxmme1337,dwisiswant0,geeknik,emenalf,adrianmf
|
2021-04-11 14:35:07 +00:00
|
|
|
severity: critical
|
|
|
|
description: Laravel uses the .env file to store sensitive information like database credentials and tokens. It should not be publicly accessible.
|
|
|
|
reference: https://laravel.com/docs/master/configuration#environment-configuration
|
2021-08-07 19:41:14 +00:00
|
|
|
tags: config,exposure,laravel
|
2020-05-23 18:09:25 +00:00
|
|
|
|
|
|
|
requests:
|
|
|
|
- method: GET
|
|
|
|
path:
|
|
|
|
- "{{BaseURL}}/.env"
|
2020-11-21 20:15:29 +00:00
|
|
|
- "{{BaseURL}}/.env.dev.local"
|
|
|
|
- "{{BaseURL}}/.env.development.local"
|
|
|
|
- "{{BaseURL}}/.env.prod.local"
|
|
|
|
- "{{BaseURL}}/.env.production.local"
|
2021-02-08 12:48:52 +00:00
|
|
|
- "{{BaseURL}}/.env.local"
|
|
|
|
- "{{BaseURL}}/.env.example"
|
|
|
|
- "{{BaseURL}}/.env.stage"
|
|
|
|
- "{{BaseURL}}/.env.live"
|
2021-08-09 06:43:29 +00:00
|
|
|
- "{{BaseURL}}/.env.backup"
|
|
|
|
- "{{BaseURL}}/.env.save"
|
2021-08-07 19:41:14 +00:00
|
|
|
- "{{BaseURL}}/.env.old"
|
|
|
|
- "{{BaseURL}}/.env_1"
|
|
|
|
- "{{BaseURL}}/.env_sample"
|
2021-08-10 02:54:37 +00:00
|
|
|
- "{{BaseURL}}/api/.env"
|
2021-08-07 19:41:14 +00:00
|
|
|
|
2020-05-24 02:44:48 +00:00
|
|
|
matchers-condition: and
|
2020-05-23 18:09:25 +00:00
|
|
|
matchers:
|
2020-07-08 20:54:41 +00:00
|
|
|
- type: regex
|
|
|
|
regex:
|
2021-08-07 19:41:14 +00:00
|
|
|
- "(?m)^APP_(NAME|ENV|KEY|DEBUG|URL|PASSWORD)="
|
|
|
|
- "(?m)^DB_(HOST|PASSWORD|DATABASE)="
|
|
|
|
condition: or
|
|
|
|
|
2020-05-24 02:44:48 +00:00
|
|
|
- type: status
|
|
|
|
status:
|
2021-08-10 02:54:37 +00:00
|
|
|
- 200
|