API Key Bypass Vulnerability in Grav Plugin by Getgrav
CVE-2026-72824
What is CVE-2026-72824?
The Grav API plugin prior to version 1.0.13 contains a significant security flaw that allows for an API key scope-cap bypass. This vulnerability arises due to an inadequate check within the PagesController::guardTwigContent() function, which improperly utilizes a bare isSuperAdmin() gate without accounting for api_key_scopes. Consequently, an API key, designated with limited permissions—specifically scoped to api.pages.write and associated with a super account—can inadvertently enable process.twig during page saves. This flaw becomes particularly critical when the security.twig_content.process_enabled is set to true and editor_enabled is false, allowing unauthorized execution of Twig-in-content, potentially leading to server-side template injection (SSTI) and facilitating remote code execution.
Affected Version(s)
grav 0 < 1.0.13
grav 1.0.13
