generic-env: Generic Env File Disclosure

日期: 2025-08-01 | 影响软件: generic-env | POC: 已公开

漏洞描述

A .env file was discovered containing sensitive information like database credentials and tokens. It should not be publicly accessible.

PoC代码[已公开]

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-522
  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: 4a0a00473045022013879e4c23b99e394bd6edf1a11242bdf01ad612299d3d5666628a446dc8290302210084913aadcc73584f0b177e8205edffb2c58fc27363095c272111d8477e6063fe:922c64590222798bb761d5b6d8e72950

相关漏洞推荐