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 tags: config,exposure,laravel requests: - method: GET path: - "{{BaseURL}}/.env" - "{{BaseURL}}/.env.dev" - "{{BaseURL}}/.env.dev.local" - "{{BaseURL}}/.env.development.local" - "{{BaseURL}}/.env.prod" - "{{BaseURL}}/.env.prod.local" - "{{BaseURL}}/.env.production" - "{{BaseURL}}/.env.production.local" - "{{BaseURL}}/.env.local" - "{{BaseURL}}/.env.example" - "{{BaseURL}}/.env.stage" - "{{BaseURL}}/.env.live" - "{{BaseURL}}/.env.backup" - "{{BaseURL}}/.env.save" - "{{BaseURL}}/.env.old" - "{{BaseURL}}/.env.www" - "{{BaseURL}}/.env_1" - "{{BaseURL}}/.env_sample" - "{{BaseURL}}/.env.{{DN}}" - "{{BaseURL}}/.env.{{SD}}" - "{{BaseURL}}/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 # Enhanced by mp on 2022/05/19