CVE-2021-21425 Unauthenticated Arbitrary YAML Write/Update leads to Code Execution
Unauthenticated attackers can modify YAML files to execute code or hijack admin accounts in Grav Admin Plugin.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2021-21425?
CVE-2021-21425 is a critical missing authorization vulnerability in getgrav grav-plugin-admin, published on 7 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-284
Which versions are affected by CVE-2021-21425?
It affects 1 product.
Products include Getgrav Grav-Plugin-Admin.
How do I fix CVE-2021-21425?
No fix has been published for CVE-2021-21425 yet. Limit exposure of the affected software until one is available.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is CVE-2021-21425 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-21425 exists.
Public exploit code: 1 Metasploit module, 1 Exploit-DB entry and 5 proofs of concept on GitHub.
Other vulnerabilities in getgrav grav-plugin-admin
- CVE-2025-66308 Grav Admin Plugin vulnerable to Cross-Site Scripting (XSS) Stored endpoint `/admin/config/site` parameter `data[taxonomies]`
- CVE-2025-66307 Grav Admin Plugin vulnerable to User Enumeration & Email Disclosure
- CVE-2025-66309 Grav is vulnerable to Cross-Site Scripting (XSS) Reflected endpoint /admin/pages/[page], parameter data[header][content][items], located in the "Blog Config" tab
- CVE-2025-66310 Grav vulnerable to Cross-Site Scripting (XSS) Stored endpoint `/admin/pages/[page]` parameter `data[header][template]` in Advanced Tab
- CVE-2025-66311 Grav vulnerable to Cross-Site Scripting (XSS) Stored endpoint `/admin/pages/[page]` in Multiples parameters
Sources
Also known as GHSA-6f53-6qgv-39pj.