CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-44738

CVE-2026-44738: Grav CMS Twig Sandbox Information Disclosure via Config::toArray()

Amit Schendel
Amit Schendel
Senior Security Researcher

May 13, 2026·6 min read·34 visits

Executive Summary (TL;DR)

Authenticated Grav CMS users with page-editing privileges can inject a specific Twig template payload to bypass the security sandbox. This action dumps the entire site configuration, exposing critical secrets such as AWS keys and OAuth client secrets to the attacker.

An information disclosure vulnerability in the Grav CMS file-based Web platform allows authenticated users with the admin.pages role to bypass Twig sandbox restrictions. By invoking the config.toArray() method, attackers can expose complete system configurations, including highly sensitive SMTP passwords, API tokens, and cloud service credentials.

Vulnerability Overview

Grav CMS is a widely deployed file-based Web platform that utilizes the Twig templating engine for rendering content and managing display logic. To secure its templating system and protect underlying architecture, Grav implements a Twig sandbox mechanism. This sandbox is purposefully designed to restrict the functions, methods, and properties available to standard content editors, preventing unauthorized code execution and limiting access to sensitive PHP environments.

CVE-2026-44738 represents a critical configuration failure within this sandbox implementation. The vulnerability permits authenticated users possessing the admin.pages role to completely bypass intended data access restrictions. This role is a standard assignment for content contributors, meaning the exploit can be executed by lower-privileged accounts to compromise the entire instance infrastructure.

The core issue is formally classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor. By abusing an overly permissive sandbox configuration, an attacker forces the application to render the complete, merged site configuration directly into the HTML output of a webpage. This configuration dataset invariably contains the sensitive secrets required for system operation and third-party service integrations.

Root Cause Analysis

The vulnerability originates from the specific configuration of the Twig sandbox allow-list within the Grav CMS core architecture. The sandbox is strictly responsible for filtering the methods that can be invoked on objects passed into the Twig rendering context. The Grav\Common\Config\Config object, which structurally holds the entire state of the application's configuration, is exposed to the Twig environment to allow frontend designers to access safe, operational configuration variables.

However, the sandbox allow-list incorrectly granted access to the toArray() method belonging to this Config object. The toArray() method is a utility function that recursively iterates through the entire configuration tree. It operates by converting the underlying structured object data into a flat, standard PHP array. This recursive conversion includes both public-facing system settings and deeply nested internal security parameters.

When an attacker calls this specific method from within a Twig template, the templating engine processes the request without triggering any sandbox security exceptions. The resulting complete configuration array is subsequently passed to the rendering engine. The rendering engine serializes and embeds this raw array data directly into the final HTML output of the page. The technical failure lies entirely in the overly broad permissions granted to the Config object within the restrictive sandbox context.

Exploitation Methodology

Exploitation of CVE-2026-44738 mandates that the attacker possesses an active, authenticated account on the target Grav CMS instance. The account must be provisioned with the admin.pages role, which grants the necessary permissions to create or edit page content. Once authenticated, the attacker accesses the Grav Admin panel and navigates to the standard page management interface.

The attacker crafts a malicious Twig payload and directly injects it into the Markdown or HTML body of a targeted page. The foundational payload consists of the template tags {{ config.toArray() }}. Depending on the target environment and specific rendering constraints, the attacker typically chains this method call with formatting filters. Payloads such as {{ config.toArray()|json_encode }} or {{ config.toArray()|print_r }} ensure the resulting output is cleanly structured and easily parsed from the rendered page source.

After saving the modified page, the attacker views the public-facing URL or utilizes the administrative preview function provided by the CMS. The Grav rendering engine parses the Twig tags, successfully bypasses the sandbox via the explicitly allowed toArray() method, and triggers the configuration dump. The attacker then simply accesses the HTTP response body and scrapes the HTML source code to extract the serialized configuration secrets.

Impact Assessment

The security impact of CVE-2026-44738 is classified as high severity, carrying a CVSS v3.1 base score of 7.7. The unauthorized disclosure of the merged system configuration provides an attacker with the cryptographic keys and authentication tokens required to compromise the entire infrastructure supporting the Grav installation. This significantly alters the scope of the initial compromise, extending the threat horizon from a single web application to multiple integrated external services.

The exposed dataset typically includes core system secrets, such as framework security salts and internal encryption keys. Attackers leverage these specific values to forge administrative sessions or locally decrypt other sensitive data stored within the file system. Furthermore, the configuration intrinsically holds highly sensitive third-party plugin parameters necessary for site operations.

Attackers can immediately harvest cleartext SMTP server credentials, AWS Access Key IDs and Secret Access Keys, OAuth client secrets, and various administrative API tokens for external service providers. If the Grav instance is configured to connect to external databases via specific data plugins, the connection strings and associated authentication credentials are also fully exposed. This comprehensive data leak enables attackers to rapidly escalate privileges, pivot to adjacent internal networks, or compromise third-party service accounts.

Remediation and Mitigation Strategy

The vendor explicitly addressed the root cause of CVE-2026-44738 in Grav version 2.0.0-rc.2. The primary and most effective mitigation strategy is an immediate upgrade to this patched release or any subsequent stable version. System administrators must verify the active software version via the Grav administrative dashboard or by utilizing the bin/gpm command-line interface tool.

The underlying code remediation involves modifying the core Twig sandbox security policy to explicitly remove the toArray() method from the allow-list governing the Config object. By categorically denying access to this specific recursive dump function, the templating engine raises a fatal sandbox security exception when the payload execution is attempted. This directly neutralizes the attacker's ability to extract the configuration state.

// Conceptual representation of the required sandbox policy modification
$policy = new \Twig\Sandbox\SecurityPolicy(
    $allowedTags, 
    $allowedFilters, 
    $allowedMethods, 
    $allowedProperties, 
    $allowedFunctions
);
 
// The patch specifically removes 'toArray' from the allowed methods for the Config class
// Vulnerable State: $allowedMethods = ['Grav\Common\Config\Config' => ['get', 'toArray', ...]];
// Patched State:    $allowedMethods = ['Grav\Common\Config\Config' => ['get', ...]];

If immediate patching is operationally impossible, administrators must strictly audit all user accounts holding the admin.pages role. Revoking this specific role from untrusted or unverified accounts effectively eliminates the primary exploitation prerequisite. Following the application of the patch, organizations must immediately cycle and rotate all system secrets, application passwords, and third-party API keys that were present in the configuration prior to remediation.

Official Patches

getgravGrav CMS 2.0.0-rc.2 Release Notes and Patch

Technical Appendix

CVSS Score
7.7/ 10
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
EPSS Probability
0.03%
Top 91% most exploited

Affected Systems

Grav CMS CoreGrav CMS Admin PluginTwig Templating Engine Integration

Affected Versions Detail

Product
Affected Versions
Fixed Version
Grav CMS
getgrav
< 2.0.0-rc.22.0.0-rc.2
AttributeDetail
CWE IDCWE-200
Attack VectorNetwork (Authenticated)
CVSS Score7.7
EPSS Score0.00031
ImpactInformation Disclosure (High)
Exploit StatusProof of Concept Available

MITRE ATT&CK Mapping

T1005Data from Local System
Collection
T1552Unsecured Credentials
Credential Access
CWE-200
Exposure of Sensitive Information to an Unauthorized Actor

Exposure of Sensitive Information to an Unauthorized Actor

Vulnerability Timeline

Vulnerability disclosed and published by GitHub and NVD
2026-05-11
Security advisory GHSA-j274-39qw-32c9 published
2026-05-11
Fix released in Grav version 2.0.0-rc.2
2026-05-11

References & Sources

  • [1]GitHub Security Advisory GHSA-j274-39qw-32c9
  • [2]NVD Record for CVE-2026-44738
  • [3]MITRE CVE Record for CVE-2026-44738
  • [4]Grav Version 2.0.0-rc.2 Release

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•11 minutes ago•CVE-2026-59723
8.8

CVE-2026-59723: Cross-Origin WebSocket Hijacking in Cline Hub Dashboard Server

A critical Cross-Origin WebSocket Hijacking (CSWSH) vulnerability exists in the Cline Hub dashboard server (@cline/cline-hub) prior to version 3.0.30. By exploiting a complete lack of Origin header validation and an insecure default configuration where ROOM_SECRET is unset, an attacker can hijack the local WebSocket connection via a malicious website. This enables unauthorized arbitrary command execution through desktopCommand frames, leading to remote code execution on the host machine.

Alon Barad
Alon Barad
1 views•6 min read
•about 1 hour ago•CVE-2026-57170
7.8

CVE-2026-57170: Server-Side Template Injection Bypass in Compliance-Trestle Include Tags

Compliance-trestle is vulnerable to Server-Side Template Injection (SSTI) leading to arbitrary code execution due to an incomplete fix for CVE-2026-46439. While the original remediation removed recursive template rendering in the core system, custom include extensions ('mdsection_include' and 'md_clean_include') continued to compile and parse files via a standard, non-sandboxed Jinja2 environment. This allows attackers who can inject template expressions into OSCAL documents or markdown files to execute arbitrary python code when the custom template processing is executed. The issue has been patched in versions 4.1.0 and 3.12.4.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 2 hours ago•CVE-2026-57171
7.7

CVE-2026-57171: Path Traversal and Arbitrary File Write in compliance-trestle

CVE-2026-57171 describes an incomplete fix of CVE-2026-46345 inside compliance-trestle. Sibling subcommands (catalog-generate, profile-generate, ssp-generate, create, and replicate) bypass path validation routines. An attacker can manipulate output parameters to perform arbitrary file writes and directory deletions.

Alon Barad
Alon Barad
3 views•5 min read
•about 3 hours ago•CVE-2026-55736
5.9

CVE-2026-55736: Mass Assignment / Parameter Pollution in Ash Framework Changeset Path

A parameter injection vulnerability exists in the Ash framework for Elixir, where untrusted string-keyed maps can bypass the 'public?: false' restriction on action arguments. An attacker can leverage this bypass to inject and overwrite private arguments, resulting in unauthorized data modification or privilege escalation depending on the target application's design.

Alon Barad
Alon Barad
6 views•5 min read
•about 4 hours ago•CVE-2026-57175
6.4

CVE-2026-57175: Improper Authentication in social-auth-core SAML Backend

An improper authentication vulnerability (CWE-287) exists in the SAML backend of the social-auth-core package before version 5.0.0. The Assertion Consumer Service (ACS) endpoint does not verify whether incoming SAML assertions match a previously initiated AuthnRequest in the user's session. This permits an attacker with credentials on a shared Identity Provider to perform a 'Session Donor' attack, permanently linking their SAML identity to an authenticated victim's account and achieving full, persistent account takeover.

Amit Schendel
Amit Schendel
7 views•6 min read
•about 5 hours ago•CVE-2026-57176
6.8

CVE-2026-57176: Multi-Tenant Account Takeover via Identity Binding Collision in python-social-auth Vend Backend

An identity binding collision vulnerability in the Vend OAuth2 backend of python-social-auth (social-core) before version 5.0.0 allows unauthenticated remote attackers to take over local accounts in multi-tenant configurations. The flaw stems from relying on shop-local numeric user IDs as global social-auth identifiers, leading to collisions when identical IDs exist across distinct tenants.

Alon Barad
Alon Barad
6 views•6 min read