Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-109324 Overview
CVE-2026-109324 is a denial of service vulnerability affecting Grav flat-file content management system (CMS) versions prior to 2.1.7. Authenticated users with media author privileges can upload compressed oversized raster images that trigger memory exhaustion during server-side processing. The weakness is tracked under [CWE-409: Improper Handling of Highly Compressed Data (Data Amplification)].
Attackers reference a Twig or Markdown transform directive that forces the GD or Imagick image library to decode the full source file without first validating image dimensions. Subsequent anonymous requests to the referenced resource repeatedly exhaust server memory, causing page unavailability for all site visitors.
Critical Impact
A single authenticated media author can render Grav-powered pages unavailable to anonymous visitors by uploading crafted compressed images that exhaust server memory on decode.
Affected Products
- Grav CMS versions prior to 2.1.7
- Grav installations using the GD image processing library
- Grav installations using the Imagick image processing library
Discovery Timeline
- 2026-10-12 - CVE-2026-109324 published to the National Vulnerability Database (NVD)
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2026-109324
Vulnerability Analysis
The vulnerability resides in Grav's media transform pipeline. When a Twig template or Markdown document references an image transform such as a resize or crop operation, Grav passes the source file to either GD or Imagick for decoding. Neither code path validates the decoded pixel dimensions before allocating a backing buffer.
Compressed raster formats such as PNG or GIF can encode very large pixel surfaces in small files. A multi-megabyte buffer on disk can expand to several gigabytes of RGB data in memory. The PHP worker process attempts the allocation, exceeds memory_limit, and terminates the request.
Because the transform output is cached by URL, every subsequent anonymous visitor that triggers the same transform repeats the allocation attempt. The result is sustained unavailability without further attacker interaction.
Root Cause
The root cause is missing dimension validation prior to image decoding. Grav trusts media uploaded by authenticated authors and does not enforce an upper bound on decoded pixel count before invoking the image library. This is a classic data amplification pattern [CWE-409] where a small compressed input expands into a resource-exhausting in-memory representation.
Attack Vector
Exploitation requires an authenticated account with media upload permissions. The attacker uploads a crafted compressed image, then creates or edits content that references the image through a Twig or Markdown transform. Once published, the transform URL is reachable without authentication, allowing anonymous clients to trigger repeated memory exhaustion against the Grav worker pool.
The public technical details are documented in the GitHub Security Advisory GHSA-h253-r5hw-95r5 and the VulnCheck advisory for Grav.
Detection Methods for CVE-2026-109324
Indicators of Compromise
- PHP worker processes terminating with Allowed memory size of X bytes exhausted entries in error logs tied to the Grav images/ cache path.
- Repeated anonymous GET requests to /images/ transform URLs that correlate with HTTP 500 or 502 responses.
- Recently uploaded media files whose compressed size is small but whose header dimensions report extreme pixel counts.
Detection Strategies
- Scan the Grav user/pages/ and user/accounts/ directories for recently added image assets, then inspect header metadata with tools such as identify from ImageMagick to flag outlier dimensions.
- Monitor web server access logs for bursts of requests to /images/{hash}/ paths that coincide with PHP-FPM worker restarts.
- Alert on sustained spikes in resident memory for PHP-FPM pools serving the Grav site.
Monitoring Recommendations
- Baseline normal memory consumption of PHP-FPM workers and alert on sustained deviations above the configured memory_limit.
- Enable audit logging for the Grav Admin plugin to attribute media uploads to specific author accounts.
- Forward web server and PHP error logs to a centralized analytics platform for correlation across upload events, transform requests, and worker failures.
How to Mitigate CVE-2026-109324
Immediate Actions Required
- Upgrade Grav to version 2.1.7 or later across all affected instances.
- Audit existing media author accounts and revoke privileges for users who do not require upload rights.
- Review the user/pages/ tree for recently added large-dimension images and remove untrusted uploads.
Patch Information
The issue is resolved in Grav 2.1.7. The upstream fix is tracked in the GitHub Security Advisory GHSA-h253-r5hw-95r5. Administrators should apply the update through the Grav CLI updater or by replacing the system files from the official release archive, then clear the cache/ and images/ directories.
Workarounds
- Restrict the Admin plugin and media upload roles to trusted operators only until the patch is applied.
- Lower the PHP memory_limit for the Grav pool so decode attempts fail fast without exhausting host memory, accepting that transform URLs will still return errors.
- Place a reverse proxy or web application firewall rule in front of /images/ transform paths to rate-limit anonymous requests per client.
# Upgrade Grav to the patched release and clear cached transforms
cd /var/www/grav
bin/gpm selfupgrade -f
bin/grav clear-cache --all
# Verify the installed version is >= 2.1.7
bin/grav --version
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

