Executive Intelligence Brief
The FormGent plugin for WordPress is vulnerable to unauthorized arbitrary file deletion due to a missing capability check on the /wp-json/formgent/responses/attachments REST API endpoint in all versions up to, and including, 1.9.2. This critical vulnerability, with a CVSS score of 9.1, allows unauthenticated attackers to delete arbitrary files within the formgent uploads directory and potentially bypass path traversal protection to delete critical files like wp-config.php, leading to complete site takeover. Immediate patching is recommended.
Threat Overview
The FormGent plugin, a popular WordPress plugin for building forms, has a significant security flaw. The vulnerability exists because the REST API route for handling attachments is registered without any authentication middleware. This oversight allows unauthenticated attackers to delete files within the plugin's upload directory. The issue is particularly severe on Linux servers where the wp-content/uploads/formgent directory does not yet exist, as it enables path traversal attacks, potentially allowing the deletion of critical files such as wp-config.php. This could lead to a complete site takeover by exploiting the vulnerability to perform a fresh WordPress installation.
Technical Deep Dive
Vulnerability Classification
The vulnerability is classified as CWE-862, which involves missing authorization. This class of vulnerability occurs when an application fails to properly verify the permissions of a user before performing an action. In this case, the FormGent plugin fails to check if a user has the capability to delete files via the REST API endpoint.
Root Cause Analysis
The root cause of this vulnerability is the lack of authentication middleware in the routes/rest/api.php file of the FormGent plugin. Specifically, the REST API endpoint for handling attachments (/wp-json/formgent/responses/attachments) does not verify if the requesting user has the necessary capabilities to delete files. This oversight allows unauthenticated attackers to send requests to delete files.
Attack Vector & Chain
The attack vector for this vulnerability is network-based (AV:N), with low attack complexity (AC:L), and does not require any privileges (PR:N) or user interaction (UI:N). The scope of the vulnerability is unchanged (S:U), with high impacts on integrity (I:H) and availability (A:H), but no impact on confidentiality (C:N). The CVSS vector is: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H.
Exploitation Scenario Walkthrough
Scenario: Unauthenticated File Deletion via FormGent REST API
Reconnaissance: An attacker discovers that a WordPress site has the FormGent plugin installed and is vulnerable (e.g., via a vulnerability scanner or manual inspection).
Weaponization: The attacker crafts a request to the /wp-json/formgent/responses/attachments endpoint with the file they wish to delete.
Delivery & Exploitation: The attacker sends a DELETE request to the vulnerable endpoint, specifying the target file. If the wp-content/uploads/formgent directory does not exist, the attacker can exploit the path traversal vulnerability to target critical files like wp-config.php.
Post-Exploitation: After deleting critical files like wp-config.php, the attacker can perform a fresh WordPress installation, gaining full control over the site.
Impact Realization: The final impact is a complete site takeover, allowing the attacker to modify the site content, inject malicious code, or use the site for further malicious activities.
Exploitation in the Wild
The vulnerability is not currently being actively exploited. However, given its severity and the potential for significant impact, it is likely that attackers will exploit this vulnerability if not promptly patched.
Impact Analysis
Direct Impact
The direct impact of this vulnerability is the potential for unauthenticated attackers to delete arbitrary files on the server, including critical configuration files like wp-config.php, leading to a complete site takeover.
Downstream & Cascading Effects
The downstream effects could include:
- Supply chain risk: If the vulnerable plugin is used in a supply chain or in a multisite network, the impact could be amplified.
- Regulatory implications: Depending on the nature of the site and the data it handles, there could be regulatory implications for not promptly patching the vulnerability.
- Customer data exposure: If sensitive data is stored on the site, there could be exposure risks.
- Operational disruption: A site takeover could lead to operational disruptions, including downtime and loss of business.
Affected Products & Versions
The FormGent plugin versions up to and including 1.9.2 are affected. The vendor has released a patch in version 1.10.0.
Detection & Threat Hunting
Indicators of Compromise
Indicators of compromise could include:
- Unusual file deletion activity in the wp-content/uploads/formgent directory.
- Logs showing requests to the /wp-json/formgent/responses/attachments endpoint from unknown IP addresses.
- Unexpected changes to critical files like wp-config.php.
Detection Rules & Signatures
Detection logic could involve monitoring:
- REST API logs for unusual patterns, especially deletions.
- File system monitoring for unexpected file deletions in the uploads directory.
Threat Hunting Queries
Threat hunting queries could include:
- Searching logs for requests to /wp-json/formgent/responses/attachments.
- Checking for changes to critical configuration files.
Remediation & Hardening
Immediate Actions (0-24 hours)
Immediate actions should include:
- Upgrading the FormGent plugin to version 1.10.0 or later.
- Monitoring logs for suspicious activity.
Short-Term Hardening (1-7 days)
Short-term hardening could involve:
- Implementing additional security measures such as a Web Application Firewall (WAF) to detect and block suspicious requests.
- Restricting access to the REST API endpoint.
Strategic Recommendations
Strategic recommendations include:
- Regularly updating plugins and themes.
- Implementing a robust security monitoring system.
- Conducting regular security audits.
Analyst Assessment
The risk of inaction is high due to the severity of the vulnerability and the potential for complete site takeover. Organizations should prioritize patching this vulnerability immediately.
Sources
- National Vulnerability Database (NVD) - CVE-2026-3141