id: opcache-status-exposure

info:
  name: OPcache Status Page - Detect
  author: pdteam
  severity: medium
  description: OPcache status page was detected.
  reference: https://www.php.net/manual/en/book.opcache.php
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    cvss-score: 5.3
    cwe-id: CWE-200
  metadata:
    max-request: 3
  tags: config,exposure,status

http:
  - method: GET
    path:
      - "{{BaseURL}}/opcache-status/"
      - "{{BaseURL}}/php-opcache-status/"
      - "{{BaseURL}}/opcache-status/opcache.php"

    matchers:
      - type: word
        words:
          - "<th>opcache_enabled</th>"
          - "<th>opcache_hit_rate</th>"
        condition: and
        part: body
# digest: 490a004630440220037d9313cd188a8d24232bc76237cba547722886ea2a56ca53f48571155846ff022003af7eef76631cbd4f5a6a7e08e176f933510fed5ec091268f610402d834094f:922c64590222798bb761d5b6d8e72950