CVE-2026-62672
published medium CVSS 4.0 · 6.0Grav: Authenticated ReDoS via regex_replace in Twig Sandbox
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| getgrav | — | grav< 2.0.4 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.0 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| getgrav | grav | < 2.0.4 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-1333 CWE-1333: Inefficient Regular Expression Complexity
References
3Provider assertions
2GitHub_M · cna
Grav: Authenticated ReDoS via regex_replace in Twig Sandbox
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- f0e15d6ba7573020ee830f9163c205e7ccc0bd623e836a251782e6a1bf4105b4
- Ingested
- 23 Sep 2026, 09:25:01 UTC
- Source record
- Official CVE record