Grav Blueprint dynamic-data arbitrary file write via error_log

Severity: high · CVSS 8.8 · Published 2026-08-18

Grav is a popular flat-file content management system. Versions before 2.0.15 contain a vulnerability in blueprint form validation that allows users with page editing or blueprint configuration permissions to invoke PHP functions and write arbitrary content to files on the web server, enabling remote code execution. An attacker with basic editor privileges can exploit this to inject malicious PHP code into web-accessible locations.

Technologies: Grav, getgrav/grav (Packagist). Vendors: Grav, Packagist.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
High severity, with a CVSS score of 8.8, published 18 August 2026.
Which products and versions are affected?
Grav < 2.0.15; getgrav/grav (Packagist) < 2.0.15.
Is there a fix for This vulnerability?
A patch was published on 2026-08-18: Patched in version 2.0.15 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network, in a web application.
Am I affected?
Check whether you run Grav or getgrav/grav (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability exists in the Blueprint dynamic-data bare-function validation (system/src/Grav/Common/Data/Blueprint.php:514-536), which uses an incomplete denylist instead of a positive allowlist to gate which PHP functions can be invoked. The error_log function is not included in the denylist and can be called via a data directive with attacker-controlled parameters. By invoking error_log($message, 3, $destination) with a PHP payload as the message and a web-accessible file path as the destination, an attacker with page-edit or blueprint-config access can append arbitrary PHP code to files. The paramsContainDangerousCallable() validation only checks for dangerous callable strings in parameters, allowing literal strings (payloads) and file paths to pass. This is a Code Injection vulnerability (CWE-94) requiring authenticated access (page-edit or blueprint-config role) but no further user interaction, and affects Grav versions prior to 2.0.15.

Affected products

  • Grav Grav < 2.0.15

Timeline

  • 2026-08-18: disclosed
  • 2026-08-18: patched: Patched in version 2.0.15

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.