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-53653

CVE-2026-53653: Unauthenticated Denial of Service via Unbounded Image Derivative Dimensions in Grav CMS

Amit Schendel
Amit Schendel
Senior Security Researcher

Aug 15, 2026·7 min read·22 visits

Executive Summary (TL;DR)

Unauthenticated attackers can crash Grav CMS servers by appending extremely large resize parameters to image URLs, forcing the server's graphics library to allocate massive memory buffers until the process is killed.

Grav CMS prior to version 1.7.53 and 2.0.0-rc.8 is vulnerable to an unauthenticated remote denial of service (DoS) vulnerability. By supplying crafted query parameters with extremely large dimensions to image assets, remote unauthenticated attackers can force the server to allocate massive amounts of system memory, leading to kernel Out-Of-Memory (OOM) termination of web worker processes.

Vulnerability Overview

Grav CMS is an open-source flat-file Content Management System written in PHP. A central element of its architecture is the dynamic parsing, optimization, and routing of media assets directly from physical disk layouts. To support on-the-fly rendering and image modifications, Grav includes a routing fallback mechanism that intercepts requests for static assets and parses dynamic processing arguments from the query string.

This dynamic pipeline exposes a critical attack surface to unauthenticated remote individuals. By targeting local image assets, attackers can append query parameters containing malicious arguments to execute resource-intensive media rendering routines. This vulnerability falls under the classification of CWE-770 (Allocation of Resources Without Limits or Throttling).

The consequence of exploiting this vulnerability is a complete denial of service across the hosting platform. Because the dynamic operations are processed using memory-intensive native C-libraries, a series of requests can rapidly exhaust the host's physical RAM. The process bypasses standard runtime constraints configured in the application environment, causing entire server pools to crash.

Root Cause Analysis

The underlying flaw resides in the routing layer of Grav, specifically within the fallbackUrl($path) method in the system/src/Grav/Common/Grav.php file. When a direct path to a media asset is requested and the static file is missing or requires dynamic adjustments, the request is dispatched to this fallback router. The fallback router resolves the physical file, loads it into memory as a Medium object, and extracts the associated URI parameters to apply processing rules.

During this resolution phase, the code iterates through the parsed parameters of the URI query string. If a parameter key belongs to the static ImageMedium::$magic_actions list, the application dynamically executes the corresponding method using PHP's call_user_func_array function, passing the query parameter values directly as arguments to the graphics rendering engine.

The critical vulnerability is that the application dispatches these arguments directly to PHP's underlying image extensions (either GD or Imagick) without performing any boundary or ceiling validation. Graphic-processing drivers operate by allocating continuous pixel arrays on the system heap. The memory requirement for processing a dynamic image scale is proportional to the target dimensions:

$$\text{Memory Allocation} = \text{Width} \times \text{Height} \times 4 \text{ bytes}$$

Because these allocations occur within the native memory space of the underlying C dependencies (such as libgd or imagemagick), they bypass PHP's standard memory manager (emalloc) and do not respect the memory_limit directive configured in php.ini. Consequently, the operating system's Out-Of-Memory (OOM) killer is forced to terminate the entire PHP-FPM worker or web server process to reclaim memory, inducing a denial of service.

Code Analysis

To understand the mechanics, we must examine the vulnerable execution loop in system/src/Grav/Common/Grav.php before the patch:

// Vulnerable Code Path
if (isset($media[$media_file])) {
    /** @var Medium $medium */
    $medium = $media[$media_file];
    foreach ($uri->query(null, true) as $action => $params) {
        // Unsanitized dispatch of user-supplied arguments to the image engine
        if (in_array($action, ImageMedium::$magic_actions, true)) {
            call_user_func_array([&$medium, $action], explode(',', (string) $params));
        }
    }
    Utils::download($medium->path(), false);
}

This loop splits user parameters by commas and passes them directly to methods like ImageMedium::resize(). There is no verification of the resulting image dimension area. The patched code introduces a dynamic limits check based on new configuration controls:

// Patched Code Path
if ($config->get('system.images.url_actions', false)) {
    $max_pixels = (int) $config->get('system.images.max_pixels', 25000000);
    foreach ($uri->query(null, true) as $action => $params) {
        if (in_array($action, ImageMedium::$magic_actions, true)) {
            $args = explode(',', (string) $params);
            
            // Reject dynamic transformations that exceed the total-pixel ceiling
            if ($max_pixels > 0 && isset(ImageMedium::$magic_resize_actions[$action])) {
                $positions = ImageMedium::$magic_resize_actions[$action];
                $w_pos = $positions[count($positions) - 2] ?? null;
                $h_pos = $positions[count($positions) - 1] ?? null;
                $width = ($w_pos !== null && isset($args[$w_pos]) && is_numeric($args[$w_pos])) ? (int) $args[$w_pos] : 0;
                $height = ($h_pos !== null && isset($args[$h_pos]) && is_numeric($args[$h_pos])) ? (int) $args[$h_pos] : 0;
                if ($width > 0 && $height > 0 && ($width * $height) > $max_pixels) {
                    return false;
                } 
            }
            call_user_func_array([&$medium, $action], $args);
        }
    }
}

The patch restricts dynamic operations by introducing the system.images.url_actions configuration, which defaults to false. It also enforces a limit of 25 megapixels via system.images.max_pixels. However, if the site administrator enables dynamic URL actions, the validation logic remains exposed to bypass attempts.

Exploitation Methodology

Exploitation of CVE-2026-53653 does not require authentication or complex configurations. An attacker merely needs to identify a valid image asset hosted within a vulnerable Grav instance. This can typically be discovered by inspecting the public pages of the site, which expose assets located in directory paths under /user/pages/ or /user/themes/.

Once an asset is located, the attacker issues an HTTP GET request appending the resize query parameter with high coordinates. The structure of the request is straightforward:

GET /user/pages/01.home/image.jpg?resize=50000,50000 HTTP/1.1
Host: target.local
User-Agent: Mozilla/5.0
Accept: */*

When this request is handled, the server's fallback router receives the request, parses the query string, and instantiates the image-resizing pipeline. The PHP extension attempts to allocate $50,000 \times 50,000 \times 4 \text{ bytes} \approx 10 \text{ GB}$ of RAM. Because this request fails to fit in physical RAM, the server terminates process execution immediately, leading to a denial of service.

Post-Patch Bypass Analysis

If a system administrator enables system.images.url_actions = true to maintain support for legacy dynamic image processing, the current implementation of the patch is vulnerable to several logical bypasses.

The primary bypass involves a single-dimension auto-resizing flaw. The patch's boundary check requires both variables $width and $height to be strictly greater than zero to calculate the total pixels. If an attacker passes only one dimension, such as ?resize=50000, the array contains only one item. The variable $height is evaluated as 0. Because the condition $width > 0 && $height > 0 evaluates to false, the pixel validation check is bypassed. The dynamic handler then delegates to the image wrapper, which automatically scales the missing height to preserve the aspect ratio, allocating an enormous memory space and causing the system to crash.

Another bypass vector is the use of negative values. The check explicitly validates that $width > 0 and $height > 0. If an attacker inputs negative integers (e.g., ?resize=-20000,-20000), the comparison fails, bypassing the validation block. Depending on how the underlying C extension parses negative dimensions, these inputs are often interpreted as absolute values or cast into large unsigned integers, triggering the allocation fault.

Finally, the default threshold of 25 megapixels allows substantial resource consumption. A persistent attacker can make multiple concurrent requests using randomized dimensions just below the threshold (e.g., ?resize=4990,4990). Because each distinct query string avoids the cache, the server is forced to continuously re-render large images, leading to CPU and memory exhaustion under modest request volumes.

Detection and Mitigation Guidance

The primary and recommended action is to upgrade Grav CMS to version 1.7.53 or 2.0.0-rc.8. These releases introduce essential security bounds and configuration switches to handle dynamic URL queries securely.

To mitigate the flaw without upgrading immediately, administrators must explicitly disable dynamic image query actions. Ensure that the system/config/system.yaml contains the following setting:

images:
  url_actions: false

This setting disables the URL-processing path entirely while leaving normal page-rendering and theme transformations intact. If dynamic image operations are required, administrators can implement a virtual patch via a Web Application Firewall (WAF) or a reverse proxy. The following custom rule pattern can be used to detect and block suspicious dynamic resizing parameters on assets in access logs or web filters:

\.(jpg|jpeg|png|gif|webp)\?(resize|forceResize|cropZoom)=([\d\-,]+)

Official Patches

getgravCore Patch for Grav 1.7.53
getgravCore Patch for Grav 2.0.0-rc.8

Fix Analysis (2)

Technical Appendix

CVSS Score
8.7/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
EPSS Probability
0.30%
Top 77% most exploited

Affected Systems

Grav CMS 1.7.xGrav CMS 2.0.x

Affected Versions Detail

Product
Affected Versions
Fixed Version
Grav CMS
getgrav
< 1.7.531.7.53
Grav CMS
getgrav
>= 2.0.0-beta.1, < 2.0.0-rc.82.0.0-rc.8
AttributeDetail
CWE IDCWE-770
Attack VectorNetwork (Unauthenticated)
CVSS v4.0 Score8.7 (High)
EPSS Score0.00301 (0.30% probability)
ImpactDenial of Service (OOM Crash)
Exploit StatusPoC / Theoretical
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-770
Allocation of Resources Without Limits or Throttling

The application allocates memory for image processing without enforcing bounds or validating the requested sizes from user inputs, leading to memory resource exhaustion.

Known Exploits & Detection

GitHub Security AdvisoryDetailed explanation of the dynamic URL parameters vulnerability.

Vulnerability Timeline

Vulnerability identified and disclosed via GitHub Security Advisory
2026-02-15
Patched versions 1.7.53 and 2.0.0-rc.8 released to public
2026-02-15

References & Sources

  • [1]Grav CMS Security Advisory
  • [2]Grav Release 1.7.53 Changelog
  • [3]Grav Release 2.0.0-rc.8 Changelog

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

•2 minutes ago•CVE-2026-109619
9.2

CVE-2026-109619: Remote Code Execution in PHP Core via Stale Global State Memory Corruption (PHP2Shell)

CVE-2026-109619 (PHP2Shell) is a critical Use-After-Free vulnerability in the core PHP engine caused by improper global state cleanup during out-of-memory exception handling across persistent worker requests.

Alon Barad
Alon Barad
1 views•6 min read
•5 minutes ago•CVE-2026-113721
4.5

CVE-2026-113721: Unsafe Link Resolution in virtualenv File Generation

In Python virtualenv prior to version 21.14.9, activation script generators and configuration writers use Path.exists() before writing files. Because Path.exists() resolves symbolic links, it returns False for dangling symlinks. Consequently, virtualenv skips unlinking pre-planted symbolic links or hard links, writing data directly to target locations outside the intended virtual environment directory.

Amit Schendel
Amit Schendel
1 views•5 min read
•9 days ago•CVE-2026-87697
8.8

CVE-2026-87697: Untrusted Deserialization in .NET PresentationCore Clipboard Handling

A remote code execution vulnerability exists in Microsoft .NET due to untrusted data deserialization within the PresentationCore component. The flaw stems from implicit auto-conversion flags during clipboard data retrieval operations.

Alon Barad
Alon Barad
31 views•5 min read
•9 days ago•CVE-2026-70007
8.8

CVE-2026-70007: Out-of-Bounds Write Vulnerability in .NET Framework and WPF Subsystem

An out-of-bounds write vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio allows unauthenticated remote attackers to execute arbitrary code via crafted pixel-shader bytecode or auto-converted clipboard payloads.

Amit Schendel
Amit Schendel
19 views•6 min read
•10 days ago•CVE-2026-70186
7.5

CVE-2026-70186: ASP.NET Core Denial of Service Vulnerability via Framework Deadlock

ASP.NET Core contains a thread deadlock vulnerability (CWE-833) that allows an unauthenticated remote attacker to cause a denial of service over the network by exhausting server thread pool resources.

Amit Schendel
Amit Schendel
18 views•5 min read
•10 days ago•CVE-2026-70035
8.8

CVE-2026-70035: Insecure Deserialization Remote Code Execution in Microsoft .NET Framework and .NET Runtime

CVE-2026-70035 is a high-severity Remote Code Execution (RCE) vulnerability in Microsoft .NET Framework, .NET runtime, and Visual Studio caused by improper handling during the deserialization of untrusted data (CWE-502). An unauthenticated attacker can execute arbitrary code within the context of the affected process by delivering a crafted serialized payload.

Amit Schendel
Amit Schendel
24 views•6 min read