CVE-2026-62672 Grav: Authenticated ReDoS via regex_replace in Twig Sandbox

Medium 6.0 Published Updated

Authenticated editors can cause denial of service via catastrophic regex backtracking in Grav CMS when Twig content processing is enabled.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-62672?

CVE-2026-62672 is a medium-severity denial of service vulnerability in getgrav grav, published on 19 Aug 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Grav is a file-based Web platform. Prior to 2.0.4, Grav allowlists the regex_replace filter and function in system/config/security.yaml, and GravExtension::regexReplace() passes an editor-controlled pattern directly to preg_replace(). When security.twig_content.process_enabled is enabled, an authenticated page editor can publish a catastrophically backtracking pattern that consumes PHP worker CPU and denies service to site visitors. This issue is fixed in version 2.0.4.

Weakness: CWE-1333

Which versions are affected by CVE-2026-62672?

How do I fix CVE-2026-62672?

Upgrade to a fixed version.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2026-62672 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-62672 exists.

Sources

Is CVE-2026-62672 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free