Description
Grav before 2.0.4 contains a regular expression denial of service (ReDoS) vulnerability in the regex_replace filter and function, which are allowlisted in the Twig content sandbox. When Twig processing in page content is enabled (security.twig_content.process_enabled: true, disabled by default), an authenticated page editor can supply a catastrophically backtracking PCRE pattern that is passed directly to PHP's preg_replace(), causing unbounded CPU consumption and denial of service to the web server process.
References (2)
Core 2
Core References
Vendor Advisory vendor-advisory
GitHub Security Advisory (GHSA-37f3-6p89-6qr9)
https://github.com/getgrav/grav/security/advisories/GHSA-37f3-6p89-6qr9
Third Party Advisory third-party-advisory
VulnCheck Advisory: Grav < 2.0.4 ReDoS via regex_replace in Sandbox
https://www.vulncheck.com/advisories/grav-redos-via-regex-replace-in-sandbox
Scores
CVSS v3
6.5
EPSS
0.0025
EPSS Percentile
16.3%
Attack Vector
NETWORK
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CISA SSVC
Vulnrichment
Exploitation
poc
Automatable
no
Technical Impact
partial
Details
CWE
CWE-1333
Status
published
Products (2)
getgrav/grav
< 2.0.4
getgrav/grav
2.0.4
Published
Jul 17, 2026
Tracked Since
Jul 17, 2026