
Python proof-of-concept exploit for CVE-2026-92592, an authenticated RCE in Craft CMS that abuses signed license-shun cookies to execute Twig payloads and run commands.
Proof of concept for CVE-2026-92592 / GHSA-5r92-75j8-c534. Craft signs attacker-controlled data in the authenticated license-shun cookie with the same key and format used for signed login redirects. Reusing that signed value as a redirect causes Craft to render it as unsandboxed Twig, allowing command execution through Twig's map('system') behavior.
Craft CMS 4.8.0 through 4.18.5 and 5.0.0 through 5.10.12 are affected. Upgrade to 4.18.6 or 5.10.13 or later. Craft 5.9.8 is affected.
Use this only against systems you own or are authorized to test.
requestscookieValidationKey and Craft's securityKeysystem(), sh, and base64 available on the targetCreate an isolated environment and install the Python package:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install requests
Run the exploit with the target URL, username, password, and command:
python3 craftcms_rce.py \
-t https://craft.example \
-u author \
-p 'password' \
'id'
Command-line passwords may be visible in shell history and process listings. Use
temporary test credentials. Pass --proxy for an HTTP debugging proxy and
--insecure only when the target uses a certificate that cannot be verified.
Command stdout and stderr are combined and printed to stdout. Run python3 craftcms_rce.py --help for all options.
app/set-license-shun-cookie and captures Craft's signed cookie value.redirect parameter in another login request.