<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Getgrav — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/getgrav/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 30 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/vendors/getgrav/feed.xml" rel="self" type="application/rss+xml"/><item><title>Grav File Cache Insecure Deserialization Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-30-grav-filecache-deserialization/</link><pubDate>Tue, 30 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-30-grav-filecache-deserialization/</guid><description>Grav versions 1.7.44 through 1.7.49.5 are vulnerable to insecure deserialization in the File Cache component, where the `unserialize` function with `allowed_classes =&gt; true` can lead to arbitrary code execution if an attacker tampers with cache files.</description><content:encoded><![CDATA[<p>Grav, a flat-file CMS, versions 1.7.44 through 1.7.49.5 are susceptible to an insecure deserialization vulnerability within the <code>FileCache</code> component. Specifically, the <code>unserialize()</code> function in <code>system/src/Grav/Framework/Cache/Adapter/FileCache.php</code> utilizes the <code>allowed_classes =&gt; true</code> option, which permits the instantiation of arbitrary classes without any restrictions. This vulnerability can be exploited if an attacker gains the ability to tamper with or poison the cache files used by Grav. By injecting malicious serialized objects into these cache files, an attacker can trigger the execution of arbitrary code when the application attempts to deserialize the tampered cache data. This issue was reported on May 5th, 2026. A fix has been implemented in Grav core on the 2.0 branch (commit <code>c66dfeb5f</code>), set to be included in version 2.0.0-beta.2. This fix introduces HMAC signing and verification to ensure the integrity of cache payloads.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker gains access to the Grav server&rsquo;s filesystem with write privileges to the cache directory.</li>
<li>The attacker crafts a malicious PHP object that, when unserialized, will execute arbitrary code. This payload could leverage existing classes or magic methods like <code>__wakeup()</code> to achieve code execution.</li>
<li>The attacker serializes the malicious PHP object using the <code>serialize()</code> function.</li>
<li>The attacker overwrites an existing cache file or creates a new one containing the serialized payload in the Grav cache directory (location varies based on configuration, but default is often in <code>cache/</code>).</li>
<li>The Grav application attempts to read the tampered cache file using the <code>FileCache::doGet()</code> function.</li>
<li>The <code>unserialize($value, ['allowed_classes' =&gt; true])</code> function is called on the tampered cache data.</li>
<li>The malicious PHP object is deserialized, triggering the execution of the attacker&rsquo;s code.</li>
<li>The attacker achieves arbitrary code execution on the Grav server, potentially leading to full system compromise, data exfiltration, or further malicious activities.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows attackers to execute arbitrary code on the Grav server. This can lead to complete system compromise, data exfiltration, defacement of websites, or the installation of backdoors for persistent access. Given that Grav is a CMS, this can impact any website or application built on the platform. The number of potential victims is dependent on the number of Grav installations running the vulnerable versions (1.7.44 - 1.7.49.5) and the attacker&rsquo;s ability to access and modify the cache files.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to Grav version 2.0.0-beta.2 or later, where the vulnerability is addressed with HMAC signing of cache payloads, as detailed in commit <code>c66dfeb5f</code>.</li>
<li>Monitor file system access, particularly writes to the cache directory, for suspicious activity. Consider deploying file integrity monitoring tools to detect unauthorized modifications to cache files.</li>
<li>If upgrading is not immediately feasible, implement strict access controls to the cache directory to prevent unauthorized write access.</li>
<li>Review and audit any plugins or custom code that utilize the <code>Grav\Framework\Cache\Adapter\FileCache</code> class, ensuring they are not susceptible to cache poisoning attacks.</li>
<li>Implement the provided PoC locally to validate your exposure and test the effectiveness of mitigations.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>insecure-deserialization</category><category>code-execution</category><category>grav</category><category>web-application</category></item><item><title>Grav API Plugin Privilege Escalation Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-grav-api-privesc/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-grav-api-privesc/</guid><description>A privilege escalation vulnerability in the Grav API plugin allows authenticated users with basic API access to elevate their privileges to Super Administrator, leading to full system compromise and potential remote code execution.</description><content:encoded><![CDATA[<p>A critical vulnerability exists within the Grav API plugin (<code>composer/getgrav/grav-plugin-api</code>) versions prior to 1.0.0-beta.15. This vulnerability, identified as CVE-2026-42843, allows any authenticated user with the <code>api.access</code> permission to escalate their privileges to Super Administrator. The flaw is due to an insecure direct object reference and logic error in the <code>UsersController::update</code> method, specifically in how user permissions are updated via the API. By sending a crafted PATCH request, a low-privileged user can modify their own access control list (ACL) to include <code>admin.super</code> and <code>api.super</code> permissions. Successful exploitation grants the attacker full control over the Grav CMS instance.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker obtains a low-privileged user account with <code>api.access</code> permission on the Grav CMS.</li>
<li>The attacker authenticates to the Grav API using the obtained credentials to receive a valid JWT access token via a POST request to <code>/api/v1/auth/token</code>.</li>
<li>The attacker crafts a malicious PATCH request to the <code>/api/v1/users/{username}</code> endpoint, targeting their own username.</li>
<li>The PATCH request includes a JSON payload that modifies the user&rsquo;s <code>access</code> field, specifically setting <code>admin.super</code> and <code>api.super</code> to <code>true</code>. For example: <code>{&quot;access&quot;:{&quot;admin&quot;:{&quot;login&quot;:true,&quot;super&quot;:true},&quot;api&quot;:{&quot;access&quot;:true,&quot;super&quot;:true},&quot;site&quot;:{&quot;login&quot;:true}}}</code>.</li>
<li>The attacker sends the crafted PATCH request to the target Grav CMS instance, including the JWT access token in the <code>X-API-Token</code> header.</li>
<li>The vulnerable <code>UsersController::update</code> method in <code>user/plugins/api/classes/Api/Controllers/UsersController.php</code> processes the request without properly validating the user&rsquo;s authority to modify their own permissions.</li>
<li>The user&rsquo;s <code>access</code> field is updated with the malicious payload, granting them Super Administrator privileges.</li>
<li>The attacker logs into the Grav Admin panel using the compromised user credentials and now has full control over the Grav CMS, able to modify content, install plugins, and potentially execute arbitrary code.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This privilege escalation vulnerability (CVE-2026-42843) allows any low-privileged user to gain complete control over a Grav CMS instance. An attacker can modify website content, inject malicious code, install backdoors, and potentially achieve remote code execution (RCE) on the underlying server by modifying Twig templates. This can lead to data breaches, website defacement, and complete compromise of the affected system.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>composer/getgrav/grav-plugin-api</code> package to version 1.0.0-beta.15 or later to patch CVE-2026-42843.</li>
<li>Deploy the Sigma rule &ldquo;Detect Grav API User Permission Escalation Attempt&rdquo; to identify attempted exploitation of this vulnerability by monitoring for PATCH requests to <code>/api/v1/users/</code> with modified access parameters.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>privilege-escalation</category><category>web-application</category><category>grav</category></item></channel></rss>