Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-53653 — grav

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-770 NVD
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Grav: Unauthenticated denial of service via unbounded image derivative dimensions

Summary

An unauthenticated visitor exhausts server memory and CPU by requesting an image with oversized resize dimensions. One request drives a worker to several gigabytes of RAM and tens of seconds of CPU. A few concurrent requests take the host down.

Details

Grav::fallbackUrl() (system/src/Grav/Common/Grav.php:800-804) loops over every query parameter and, when the name matches ImageMedium::$magic_actions, calls that method on the medium with the comma-split value as arguments:

```php

foreach ($uri->query(null, true) as $action => $params) {

if (in_array($action, ImageMedium::$magic_actions, true)) {

call_user_func_array([&$medium, $action], explode(',', $params));

}

}

```

forceResize runs with force=true, so it sets the output size to the attacker's values with no clamp against the source or any ceiling. The getgrav/image GD adapter then calls imagecreatetruecolor($w, $h). libgd allocates that buffer outside PHP's emalloc, so memory_limit does not cap it. Grav exposes no system.images.max_width/max_height setting.

PoC

Any page that serves an image works. With a 200x150 source image:

```

GET /home/test.png?forceResize=20000,20000

```

Measured on PHP 8.4.21 with memory_limit=128M:

  • peak worker RSS 3,109 MB
  • 21.9 s CPU
  • HTTP 200, 1.6 MB response

8000x8000 already needs ~244 MB. The cache key includes the dimensions, so varying them forces fresh work on every request.

Impact

Unauthenticated denial of service against any Grav site that serves images. No account, plugin, or non-default config required.

Fix

Clamp the request-derived dimensions before dispatch, behind a configurable cap. The image library is the wrong layer; bound the arguments at the request boundary.

```diff

--- a/system/src/Grav/Common/Grav.php

+++ b/system/src/Grav/Common/Grav.php

@@ public function fallbackUrl($path)

foreach ($uri->query(null, true) as $action => $params) {

if (in_array($action, ImageMedium::$magic_actions, true)) {

  • call_user_func_array([&$medium, $action], explode(',', $params));

+ $args = explode(',', $params);

+ $max = (int) $config->get('system.images.max_dimension', 8000);

+ if ($max > 0

+ && in_array($action, ['resize', 'forceResize', 'cropResize', 'cropZoom', 'zoomCrop', 'crop'], true)) {

+ foreach ($args as $a) {

+ if (is_numeric($a) && (int) $a > $max) {

+ return false; // reject oversized derivative request

+ }

+ }

+ }

+ call_user_func_array([&$medium, $action], $args);

}

}

```

Document system.images.max_dimension (default 8000) so operators can tune it. A total-pixel ceiling (width * height) is a stricter alternative.

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. Rated impact: confidentiality none, integrity none, availability high.

CVSS metrics in full

The score comes from this vector: 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

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Attack requirements: None — no deployment-specific condition has to hold.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Confidentiality impact: None.
  • Integrity impact: None.
  • Availability impact: High — total loss, or loss the attacker controls.

Weakness class

CVE-2026-53653 is classified as CWE-770: Allocation of Resources Without Limits. Resources are allocated on request with no cap, so a client can exhaust them.

Affected software

CVE-2026-53653 is recorded against 2 packages.

  • getgrav/grav (fixed in 1.7.53)
  • unknown

Timeline and source

Published on 14 August 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Web)
github.com (Package)
github.com (Web)
github.com (Web)

Other advisories for this package

getgrav/grav has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-770: Allocation of Resources Without Limits) in other software:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector 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
CWE CWE-770
Public Exploit ✅ No
Source NVD
Published 2026-08-14
Updated 2026-08-20
Modified 2026-08-14
Fix URL N/A

Affected Packages

Software From version Fixed in
getgrav/grav — 1.7.53
unknown — —

Similar Threats

Site Security Check

Is grav part of your stack?

CVE-2026-53653 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026
✓