id: wordpress-wordpress-seo

info:
  name: Yoast SEO – Advanced SEO with real-time guidance and built-in AI Detection
  author: ricardomaia
  severity: info
  reference:
    - https://wordpress.org/plugins/wordpress-seo/
  metadata:
    plugin_namespace: wordpress-seo
    wpscan: https://wpscan.com/plugin/wordpress-seo
  tags: tech,wordpress,wp-plugin,top-100,top-200,discovery

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/wordpress-seo/readme.txt"

    payloads:
      last_version: helpers/wordpress/plugins/wordpress-seo.txt

    extractors:
      - type: regex
        part: body
        internal: true
        name: internal_detected_version
        group: 1
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'

      - type: regex
        part: body
        name: detected_version
        group: 1
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'

    matchers-condition: or
    matchers:
      - type: dsl
        name: "outdated_version"
        dsl:
          - compare_versions(internal_detected_version, concat("< ", last_version))

      - type: regex
        part: body
        regex:
          - '(?i)Stable.tag:\s?([\w.]+)'
# digest: 490a0046304402206d6f1080fd1297f847c701a7f18c6c0053249c2f427b2c402652ba8f644b81a902204548edfdfe4f190bcd8ae734a97bb4b7bf2e2e685c7e21b596a3a76ba4c93b75:922c64590222798bb761d5b6d8e72950