Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
CriticalPublic exploit

Unauthenticated Plugin Installation and Activation in Hunk Companion WordPress Plugin

IdentifiersCVE-2024-11972CWE-863

CVE-2024-11972 is an authorization bypass vulnerability in the Hunk Companion WordPress plugin affecting versions prior to 1.9.0. The flaw is in the REST API route exposed at /wp-json/hc/v1/themehunk-import, implemented in code referenced as hunk-companion/import/app/app.php and hunk-companion/import/core/class-installation.php. The route’s permission_callback was intended to restrict access, but it returned WP_REST_Response objects on failed authorization checks instead of returning false or a WP_Error. Because WordPress expects a boolean or WP_Error from permission_callback, the callback effectively failed open and unauthorized requests were treated as allowed. As a result, an unauthenticated attacker could send POST requests to invoke the tp_install function and trigger the HUNK_COMPANION_SITES_BUILDER_SETUP logic to install and activate arbitrary plugins from the WordPress.org repository by slug. The issue was observed in active exploitation, including abuse to install the closed WP Query Console plugin and then chain into its separate RCE vulnerability, CVE-2024-50498, to execute arbitrary PHP code and deploy a persistent backdoor.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows unauthenticated remote attackers to install and activate arbitrary plugins from the WordPress.org repository on a vulnerable WordPress site. This can directly expand the attack surface and enable follow-on compromise through vulnerable, closed, or maliciously selected plugins. Observed real-world exploitation chained this flaw with WP Query Console to achieve arbitrary PHP code execution and persistent backdoor deployment. Depending on the plugin installed, downstream impact can include full site compromise, arbitrary code execution, data theft, SQL injection, cross-site scripting, creation of administrative backdoors, and long-term persistence.

Mitigation

If you can’t patch tonight, do this now.

If immediate patching is not possible, disable or remove the Hunk Companion plugin until it can be updated. Restrict access to the vulnerable REST endpoint /wp-json/hc/v1/themehunk-import via WAF, reverse proxy, or web server rules, and monitor for POST requests to that path. Continuously monitor for unexpected plugin installation/activation events and for requests attempting to access newly installed plugin endpoints. Because exploitation has been observed in the wild, defenders should also hunt for indicators of secondary compromise, including suspicious PHP files in the web root and requests to /?rest_route=/wqc/v1/query.

Remediation

Patch, then assume compromise.

Upgrade the Hunk Companion plugin to version 1.9.0 or later, which the vendor patched and researchers confirmed no longer exposes the vulnerable behavior. Review installed plugins for unauthorized additions, especially WP Query Console or other unexpected plugins installed from the WordPress.org repository. Inspect the web root and plugin directories for dropped PHP files and backdoors, review access logs for requests to /wp-json/hc/v1/themehunk-import and any subsequent malicious REST activity, and remove any unauthorized artifacts. If compromise is suspected, rotate WordPress administrator credentials and any other secrets stored on the host.
PUBLIC EXPLOITS

Exploits

3 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (1 hidden).

VALID 3 / 4 TOTALView more in app
exploit-CVE-2024-11972MaturityPoCVerified exploit

This repository contains a proof-of-concept (PoC) exploit for CVE-2024-11972, targeting the Hunk Companion WordPress plugin (versions below 1.9.0). The exploit is implemented in a single Python script, 'hunk_companion_exploit.py', which automates the process of exploiting an authentication bypass in the plugin's REST API endpoint '/wp-json/hc/v1/themehunk-import'. By sending a specially crafted POST request, an unauthenticated attacker can install and activate any plugin from the official WordPress plugin repository on the target site. The script requires the attacker to specify the target WordPress site's URL and the desired plugin's slug. The repository also includes a README.md with detailed usage instructions and a LICENSE file. No hardcoded IPs or domains are present; the endpoint is relative and must be combined with the attacker's chosen target URL. The exploit is a functional PoC and does not include advanced payloads or post-exploitation features.

NoxPenguinDisclosed Dec 15, 2024pythonnetwork
CVE-2024-11972-PoCMaturityPoCVerified exploit

This repository contains a Python proof-of-concept exploit (CVE-2024-11972.py) targeting the Hunk Companion WordPress plugin versions less than 1.9.0. The exploit leverages an unauthenticated REST API endpoint (/wp-json/hc/v1/themehunk-import) to install and activate arbitrary plugins from the WordPress.org repository on a vulnerable WordPress site. The script first checks the installed plugin version by fetching /wp-content/plugins/hunk-companion/readme.txt, then, if the version is vulnerable, sends a crafted POST request to the REST API endpoint to trigger the plugin installation. The repository also includes a README.md with usage instructions and a description of the vulnerability. The exploit is a network-based, unauthenticated attack and does not require prior access to the target site.

NxploitedDisclosed Jan 29, 2025pythonnetwork
CVE-2024-11972-POCMaturityPoCVerified exploit

This repository contains a Python exploit (exploit.py) and a detailed README for CVE-2024-11972, a critical unauthenticated plugin installation vulnerability in the Hunk Companion WordPress plugin (versions < 1.9.0). The exploit works by sending a crafted POST request to the '/wp-json/hc/v1/themehunk-import' REST API endpoint, which, due to improper authorization checks in vulnerable versions, allows any user to install and activate arbitrary plugins from the WordPress.org repository. The exploit script first checks the installed version of the Hunk Companion plugin by fetching its readme.txt, then attempts exploitation if the version is vulnerable. The README provides a thorough breakdown of the vulnerability, including code snippets from the plugin's source and a comparison of security fixes across versions. The main attack vector is network-based, targeting the exposed REST API endpoint. The exploit enables attackers to install further malicious or vulnerable plugins, potentially leading to remote code execution, database compromise, or persistent backdoors. The repository is well-structured, with a single exploit script and comprehensive documentation.

RonF98Disclosed Jan 13, 2025pythonnetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
ThemehunkHunk Companionapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware1

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity7

Community discussion across Reddit, Mastodon, and other social sources.