CVE-2026-62672 Grav: Authenticated ReDoS via regex_replace in Twig Sandbox
MediumCVSS 6.0
EPSS 0.38%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
- Technology
- PHP
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.
Upgrade path
2 packages: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| getgrav/grav(Packagist) | < 2.0.4 | 2.0.4 | Fixed |
| getgrav/grav | = < 2.0.4 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| getgrav/grav | = < 2.0.4 | No fix listed |
| getgrav/grav(Packagist) | < 2.0.4 | 2.0.4 |
References
- https://github.com/getgrav/grav/security/advisories/GHSA-37f3-6p89-6qr9 exploit vendor-advisory
- https://github.com/getgrav/grav/commit/907116268ad4f48be7472c57f64981918578599a patch
- https://github.com/getgrav/grav/releases/tag/2.0.4
- nvd.nist.gov third-party-advisory
- github.com
- ENISA EUVD EUVD-2026-62542 third-party-advisory