CVE-2021-21425 Unauthenticated Arbitrary YAML Write/Update leads to Code Execution

Critical 9.3 Published Updated

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.

Sources

Also known as GHSA-6f53-6qgv-39pj.

Is CVE-2021-21425 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free