id: wp-cookie-law-info-fpd

info:
  name: WordPress Plugin GDPR Cookie Consent - Full Path Disclosure
  author: ritikchaddha
  severity: low
  description: |
    WordPress GDPR Cookie Consent (cookie-law-info) plugin is vulnerable to full path disclosure via direct access to plugin files.
  reference:
    - https://wordpress.org/plugins/cookie-law-info/
  metadata:
    verified: true
    max-request: 3
    vendor: developer
    product: cookie-law-info
    framework: wordpress
    fofa-query: body="/wp-content/plugins/cookie-law-info/"
  tags: wp,wordpress,wp-plugin,fpd,gdpr,cookie,exposure

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/cookie-law-info/includes/class-cookie-law-info.php"
      - "{{BaseURL}}/wp-content/plugins/cookie-law-info/admin/class-cookie-law-info-admin.php"
      - "{{BaseURL}}/wp-content/plugins/cookie-law-info/legacy/class-cookie-law-info.php"

    stop-at-first-match: true

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200 || status_code == 500'
          - 'contains(body, "cookie-law-info")'
          - 'contains_all(body, "Fatal error", "Uncaught Error:") || contains_all(body, "Warning:","failed to open stream")'
        condition: and
# digest: 4b0a0048304602210084571029f21ce97293c8ac127d40c085a863e8597fad910b158e9a65ffcc7f2f022100bb1f5dac92b41a551ad5c0fae852317ba7e9d95a972e5ccc92ffeff5e697de94:922c64590222798bb761d5b6d8e72950