id: python-venv-exposure

info:
  name: Python Virtual Environment  Directory Exposure
  author: a1baradi
  severity: info
  description: |
    An exposed Python virtual environment directory allows public access to internal files like pyvenv.cfg, installed packages, and configurations. This can leak sensitive information and aid attackers in identifying or exploiting vulnerabilities.
  reference:
    - https://docs.python.org/3/library/venv.html
  metadata:
    verified: true
    max-request: 1
    google-query: "intitle: Index of /venv"
  tags: venv,exposure,python-env,info,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/venv/"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "Index of /venv"

      - type: status
        status:
          - 200
# digest: 490a0046304402203ccfb1606292f4f939c8632355f296cac103f56018855a1cd562c7cd3ffafaf202206a5ef0dd2bf32214b921db527ff9353af613f1fa1d6104f4158fe8a2c040457e:922c64590222798bb761d5b6d8e72950