generic-env: Generic Env File Disclosure
- Template: generic-env
- Name: Generic Env File Disclosure
- Description: A .env file was discovered containing sensitive information like database credentials and tokens. It should not be publicly accessible.
- Severity: high
- Authors: kazet
- Tags: config, exposure, env, vuln
- Max requests: 22
- Directory: http/vulnerabilities
- Path: http/vulnerabilities/generic/generic-env.yaml
- Digest: 4a0a00473045022051b734acbb32375ed4c37fd2a32ae75d6f7d9665e5c2e40bdc496ec1dcde80dc022100e78885ff5ba53aca7acd8ce095f6aedd065fa7c62eb823d8b2adae36b28746fe
- Created at: 2023-05-11T09:34:42Z
- Updated at: 2026-05-18T00:57:55Z
- Age in days: 1292
- Template url: https://github.com/projectdiscovery/nuclei-templates/blob/main/http/vulnerabilities/generic/generic-env.yaml
- Checked, none or zero: references, cves, verified, products
- Not known: impact, remediation
Classification
- Cwe: CWE-552
- Cvss score: 8.3
- Cvss vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L
- Not known: epss score, epss percentile, cpe
Metadata
- Max-request: 22
Labels
- Name: Generic Env File - Information Disclosure
- Impact: Attackers can retrieve sensitive information such as database credentials and tokens, potentially leading to further compromise.
- Remediation: Restrict public access to .env files and update to the latest version if applicable.
- Vulnerability type: misconfiguration
- Vulnerability impact: information_disclosure
- Requirement type: none
- Labels source: securitycontext
- Not known: requirements, from cve
```yaml
id: generic-env
info:
name: Generic Env File Disclosure
author: kazet
severity: high
description: |
A .env file was discovered containing sensitive information like database credentials and tokens. It should not be publicly accessible.
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-552
metadata:
max-request: 22
tags: config,exposure,env,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.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)^[a-z_]*(KEY|TOKEN|PASS|SECRET|DB_URL|DATABASE_URL|MAILER_URL)[a-z_]*="
- type: word
part: body
negative: true
words:
- "<html"
digest: 4a0a00473045022051b734acbb32375ed4c37fd2a32ae75d6f7d9665e5c2e40bdc496ec1dcde80dc022100e78885ff5ba53aca7acd8ce095f6aedd065fa7c62eb823d8b2adae36b28746fe:922c64590222798bb761d5b6d8e72950
```