Vulnerability · Published Aug 19, 2026 · Assigned by GitHub_M

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

Medium 6.0

In plain English

A medium-severity regular-expression denial of service in grav from getgrav. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 32% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)6.0Medium
Exploit odds (30 days)0.4%top 67.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Packagistgetgrav/grav2.0.4GHSA-37f3-6p89-6qr9

Affected products (as reported)

VendorProductVersions
getgrav grav < 2.0.4

Weakness: CWE-1333 · Vector: CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

References