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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Packagist | getgrav/grav | 2.0.4 | GHSA-37f3-6p89-6qr9 |
Affected products (as reported)
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
- https://github.com/getgrav/grav/security/advisories/GHSA-37f3-6p89-6qr9 x_refsource_CONFIRM
- https://github.com/getgrav/grav/commit/907116268ad4f48be7472c57f64981918578599a x_refsource_MISC
- https://github.com/getgrav/grav/releases/tag/2.0.4 x_refsource_MISC