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 http: - method: GET path: - "{{BaseURL}}/.env" - "{{BaseURL}}/.env.bak" - "{{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 # digest: 490a0046304402201275cf10646171220ad193b5bbef7b7602ef9d2ab0c9acb901338e4e10d77ed502204937d7b418be7c12d3d8b7bbdd37da0e7cb8e951f39bfcd93be9b676c93bd9d7:922c64590222798bb761d5b6d8e72950