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 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 mechanism. An attacker with control over the title frontmatter of a publicly accessible Flex Objects page can execute arbitrary Twig code, which may escalate to remote command execution by leveraging internal Grav services such as the scheduler.
Potential Impact
Successful exploitation allows an attacker with limited privileges to execute arbitrary Twig templates on the server, leading to potential remote command execution. This compromises the confidentiality, integrity, and availability of the affected system. The vulnerability has a high CVSS 4.0 score of 8.7, reflecting its severity and ease of exploitation without user interaction.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict or validate user input controlling the frontmatter titles in Flex Objects pages to prevent injection of malicious Twig code. Monitor vendor channels for updates regarding a patch or official remediation.
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 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 mechanism. An attacker with control over the title frontmatter of a publicly accessible Flex Objects page can execute arbitrary Twig code, which may escalate to remote command execution by leveraging internal Grav services such as the scheduler.
Potential Impact
Successful exploitation allows an attacker with limited privileges to execute arbitrary Twig templates on the server, leading to potential remote command execution. This compromises the confidentiality, integrity, and availability of the affected system. The vulnerability has a high CVSS 4.0 score of 8.7, reflecting its severity and ease of exploitation without user interaction.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, restrict or validate user input controlling the frontmatter titles in Flex Objects pages to prevent injection of malicious Twig code. Monitor vendor channels for updates regarding a patch or official remediation.
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/30/2026, 00:03:12 UTC
Last updated: 08/29/2026, 22:52:12 UTC
Views: 57
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.