Closed emadshanab closed 3 years ago
id: dotenv-file-environment-disclosure info: name: Dotenv file environment disclosure author: emadshanab severity: high description: dotenv file environment disclosure leading to exposing symfony APP_SECRET and MAILER_DSN password. reference: https://www.acunetix.com/vulnerabilities/web/dotenv-env-file/ tags: exposure requests: - method: GET path: - "{{BaseURL}}/api/.env" matchers-condition: and matchers: - type: word words: - "APP_SECRET" - type: status status: - 200 - type: word words: - "APP_SECRET" - "MAILER_DSN" -"symfony" -"DATABASE_URL" condition: or part: header
Also add - "{{BaseURL}}/.env" to requests path.
- "{{BaseURL}}/.env"
I think you must add this to an existed template
https://github.com/projectdiscovery/nuclei-templates/blob/master/exposures/configs/laravel-env.yaml