id: php-cs-cache

info:
  name: PHP-CS-Fixer Cache - File Disclosure
  author: DhiyaneshDk
  severity: medium
  description: PHP CS fixer cache internal file is disclosed.
  reference:
    - https://www.acunetix.com/vulnerabilities/web/php-cs-fixer-cache-file-publicly-accessible-php_cs-cache/
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"php_cs.cache"
  tags: exposure,files,php

http:
  - method: GET
    path:
      - "{{BaseURL}}/.php_cs.cache"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '{"php":'
          - '"version":'
          - '"indent":'
        condition: and

      - type: status
        status:
          - 200
# digest: 4a0a0047304502201d3478582863705be394f6ad29207101af55ec291cc6e789d4f455a7301a6deb02210081d2f31e887c3d0d6e4e1586f580d368c3997009f399104438ce27c13db4ee68:922c64590222798bb761d5b6d8e72950