2023-05-10 11:17:21 +00:00
|
|
|
id: generic-env
|
2023-04-24 12:53:08 +00:00
|
|
|
|
|
|
|
info:
|
2023-05-10 11:17:21 +00:00
|
|
|
name: Generic Env File Disclosure
|
2023-04-24 14:13:53 +00:00
|
|
|
author: kazet
|
2023-06-03 18:56:35 +00:00
|
|
|
severity: high
|
2023-04-24 12:53:08 +00:00
|
|
|
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-522
|
2023-06-03 18:56:35 +00:00
|
|
|
metadata:
|
|
|
|
max-request: 22
|
2023-05-10 11:17:21 +00:00
|
|
|
tags: config,exposure,env
|
2023-04-24 12:53:08 +00:00
|
|
|
|
2023-05-11 09:19:23 +00:00
|
|
|
http:
|
2023-04-24 12:53:08 +00:00
|
|
|
- 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"
|
|
|
|
|
2023-08-09 08:42:01 +00:00
|
|
|
matchers-condition: and
|
2023-04-24 12:53:08 +00:00
|
|
|
matchers:
|
|
|
|
- type: regex
|
|
|
|
part: body
|
|
|
|
regex:
|
|
|
|
- "(?mi)^[a-z_]*(KEY|TOKEN|PASS|SECRET|DB_URL|DATABASE_URL|MAILER_URL)[a-z_]*="
|
2023-08-09 08:42:01 +00:00
|
|
|
|
|
|
|
- type: word
|
|
|
|
part: body
|
|
|
|
negative: true
|
|
|
|
words:
|
|
|
|
- "<html"
|
2023-10-20 11:41:13 +00:00
|
|
|
|
|
|
|
# digest: 490a004630440220547bb968413b5bb510e75cc5dd3135d11954ea3c79ed2e3417088143b020e76802205ab6a107244bb426ca80737c2e5f601b2546cd26277330e52f218b4544def2f2:922c64590222798bb761d5b6d8e72950
|