CVE-2026-58655: Improper Control of Generation of Code ('Code Injection') in getgrav grav
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.
AI Analysis
Technical Summary
The Grav Flex Objects plugin (getgrav/grav-plugin-flex-objects) prior to version 1.4.0 contains a stored server-side template injection vulnerability. Specifically, when rendering dynamic collection or object titles, user-controlled frontmatter values (page.header.flex.collection.title or page.header.flex.object.title) are passed directly to Twig's template_from_string() function. This causes these values to be evaluated as Twig code rather than treated as plain text, bypassing Grav's Security::cleanDangerousTwig() sanitization. An attacker able to control these frontmatter titles on a publicly reachable Flex Objects page can achieve arbitrary Twig code execution, which can escalate to remote command execution by leveraging internal Grav services such as the scheduler.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary Twig code on the server, leading to potential remote command execution. This can compromise the confidentiality, integrity, and availability of the affected system. The vulnerability requires the attacker to have the ability to control the title frontmatter of a publicly accessible Flex Objects page, but no user interaction or privileges beyond low-level access are required. The CVSS 4.0 base score is 8.7 (high severity), reflecting network attack vector, low attack complexity, no privileges required, no user interaction, and high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch information is provided in the available data. Until a patch is available, restrict or monitor access to Flex Objects pages that allow user-controlled frontmatter titles. Avoid exposing such pages publicly or limit the ability of untrusted users to modify frontmatter titles. Follow vendor advisories for updates and apply official fixes once released.
CVE-2026-58655: Improper Control of Generation of Code ('Code Injection') in getgrav grav
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.
CVSS v4.0
Score 8.7high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Grav Flex Objects plugin (getgrav/grav-plugin-flex-objects) prior to version 1.4.0 contains a stored server-side template injection vulnerability. Specifically, when rendering dynamic collection or object titles, user-controlled frontmatter values (page.header.flex.collection.title or page.header.flex.object.title) are passed directly to Twig's template_from_string() function. This causes these values to be evaluated as Twig code rather than treated as plain text, bypassing Grav's Security::cleanDangerousTwig() sanitization. An attacker able to control these frontmatter titles on a publicly reachable Flex Objects page can achieve arbitrary Twig code execution, which can escalate to remote command execution by leveraging internal Grav services such as the scheduler.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary Twig code on the server, leading to potential remote command execution. This can compromise the confidentiality, integrity, and availability of the affected system. The vulnerability requires the attacker to have the ability to control the title frontmatter of a publicly accessible Flex Objects page, but no user interaction or privileges beyond low-level access are required. The CVSS 4.0 base score is 8.7 (high severity), reflecting network attack vector, low attack complexity, no privileges required, no user interaction, and high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch information is provided in the available data. Until a patch is available, restrict or monitor access to Flex Objects pages that allow user-controlled frontmatter titles. Avoid exposing such pages publicly or limit the ability of untrusted users to modify frontmatter titles. Follow vendor advisories for updates and apply official fixes once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-07-01T21:54:37.946Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a57771e68715ace43a93b74
Added to database: 07/15/2026, 12:03:42 UTC
Last enriched: 07/15/2026, 12:19:38 UTC
Last updated: 07/16/2026, 03:34:41 UTC
Views: 10
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.