Description
The Grav API plugin (getgrav/grav-plugin-api) before 1.0.13 contains an API key scope-cap bypass in PagesController::guardTwigContent(). The Twig-toggle check uses a bare isSuperAdmin() gate that does not consult api_key_scopes, so a least-privilege API key scoped only to api.pages.write and minted on a super account can enable process.twig on a page save even though admin.pages_twig is intentionally outside the api.pages scope. When security.twig_content.process_enabled=true and editor_enabled=false, this allows Twig-in-content to execute server-side, resulting in server-side template injection (SSTI) and remote code execution.
Published: 2026-08-14
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Grav API plugin implements an API key scope enforcement flaw in the PagesController::guardTwigContent() method. The check that prevents uncontrolled Twig execution relies only on an isSuperAdmin() gate and ignores the api_key_scopes permissions token. Because an API key limited to the api.pages.write scope can still trigger the unsafe process.twig option during page save, the application performs server‑side template injection if both security.twig_content.process_enabled=true and editor_enabled=false. Consequently an attacker controlling such an API key can inject and execute arbitrary Twig code, giving full remote code execution capabilities.

Affected Systems

The vulnerability is present in Grav versions earlier than 1.0.13. It affects the getgrav:grav product wherever the API plugin is installed and active, regardless of the site’s configuration for Page writing or administrative privileges.

Risk and Exploitability

With a CVSS score of 8.7 the vulnerability is high. The EPSS score is < 1% (0.00467), indicating a low but nonzero probability of exploitation, but lack of a KEV listing does not diminish the inherent severity; many exploit attempts use API tokens in automated scripts. An attacker would need to obtain or mint a super‑account API key scoped to api.pages.write, then send a page update that includes malicious Twig expressions while the page editor is disabled. The bypass is straightforward for anyone with API access, making exploitation highly likely in environments where API keys are shared or not tightly monitored.

Generated by OpenCVE AI on August 24, 2026 at 11:52 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Grav to version 1.0.13 or newer, which applies the missing scope check in guardTwigContent().
  • Revoke or rotate any API keys that were created or shared under the super account level; avoid minting super‑account keys for minimal‑privilege operations.
  • If migration is impossible in the short term, disable unsafe Twig processing by setting security.twig_content.process_enabled to false or enable the editor so that Twig‑in‑content is not evaluated during page saves.

Generated by OpenCVE AI on August 24, 2026 at 11:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 24 Aug 2026 10:45:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


Fri, 14 Aug 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 14 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
Description The Grav API plugin (getgrav/grav-plugin-api) before 1.0.13 contains an API key scope-cap bypass in PagesController::guardTwigContent(). The Twig-toggle check uses a bare isSuperAdmin() gate that does not consult api_key_scopes, so a least-privilege API key scoped only to api.pages.write and minted on a super account can enable process.twig on a page save even though admin.pages_twig is intentionally outside the api.pages scope. When security.twig_content.process_enabled=true and editor_enabled=false, this allows Twig-in-content to execute server-side, resulting in server-side template injection (SSTI) and remote code execution.
Title Grav before 1.0.13 API Key Scope Bypass via PagesController
First Time appeared Getgrav
Getgrav grav
Weaknesses CWE-862
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*
Vendors & Products Getgrav
Getgrav grav
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-24T10:28:31.860Z

Reserved: 2026-08-10T15:12:59.508Z

Link: CVE-2026-72824

cve-icon Vulnrichment

Updated: 2026-08-14T14:46:01.343Z

cve-icon NVD

Status : Deferred

Published: 2026-08-14T12:16:45.520

Modified: 2026-08-31T20:38:54.340

Link: CVE-2026-72824

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-24T12:00:14Z

Weaknesses