CVE-2026-58655

Grav Flex Objects - Server-Side Template Injection via Dynamic Titles

Published Jul 15, 2026 CVSS 4.0 · 8.7 High EPSS 1.4% KEV · Not listed
Description
The bundled Grav Flex Objects plugin (getgrav/grav-plugin-flex-objects) before 1.4.0 contains a stored server-side template injection vulnerability. When rendering dynamic collection or object titles, the plugin passes user-controlled frontmatter values (page.header.flex.collection.title or page.header.flex.object.title) to Twig's template_from_string(), causing them to be evaluated as Twig code rather than treated as text. This path bypasses Grav's Security::cleanDangerousTwig() sanitization. An attacker who can control the title frontmatter of a publicly reachable Flex Objects page can achieve arbitrary Twig execution and escalate to remote command execution via access to internal Grav services such as the scheduler.

Analysis

AI-generated

Technical impact

The Grav Flex Objects plugin allows page administrators to supply titles for collection or object pages via frontmatter fields. The plugin incorrectly passes these user‑controlled frontmatter values directly to Twig’s template_from_string() without sanitization, creating a stored server‑side template injection. An attacker can embed malicious Twig instructions in the title field, which the system will execute when rendering the page. The exposed Twig expressions can be leveraged to trigger Grav internal services such as the scheduler, potentially escalating to remote shell execution on the host.

Affected Systems

Installations of getgrav/grav-plugin-flex-objects that are running any version earlier than 1.4.0 are vulnerable. The flaw is tied specifically to the handling of page.header.flex.collection.title and page.header.flex.object.title frontmatter fields used for dynamic titles.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity, while the EPSS score of 1 % suggests a low but non‑zero probability of exploitation. Because the vulnerability is triggered by manipulating frontmatter on a publicly reachable Flex Objects page, the likely attack vector is remote via an HTTP request that updates or creates the page content. The flaw is not listed in CISA KEV at this time but the combination of high impact and the potential for remote code execution makes it an urgent security issue.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Grav Flex Objects plugin to version 1.4.0 or newer to eliminate the vulnerable code path
  • If a swift upgrade is not possible, disable or explicitly sanitize the dynamic title functionality in the Flex Objects configuration to prevent injection
  • Limit editing privileges for frontmatter fields that contain collection or object titles to trusted users only so that malicious content cannot be injected

Generated by OpenCVE AI on July 31, 2026 at 04:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*
Type Values Removed Values Added
First Time appeared Getgrav
Getgrav grav
Vendors & Products Getgrav
Getgrav grav
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description The bundled Grav Flex Objects plugin (getgrav/grav-plugin-flex-objects) before 1.4.0 contains a stored server-side template injection vulnerability. When rendering dynamic collection or object titles, the plugin passes user-controlled frontmatter values (page.header.flex.collection.title or page.header.flex.object.title) to Twig's template_from_string(), causing them to be evaluated as Twig code rather than treated as text. This path bypasses Grav's Security::cleanDangerousTwig() sanitization. An attacker who can control the title frontmatter of a publicly reachable Flex Objects page can achieve arbitrary Twig execution and escalate to remote command execution via access to internal Grav services such as the scheduler.
Title Grav Flex Objects - Server-Side Template Injection via Dynamic Titles
Weaknesses CWE-94
References
Metrics 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'}

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Jul 28, 2026, 1:02 PM
Reserved
Jul 1, 2026, 9:54 PM
Status
Deferred
Published
Jul 15, 2026, 12:18 PM
Modified
Oct 24, 2026, 10:10 PM