CVE-2026-62237 PUBLISHED

Grav < 2.0.4 ReDoS via regex_replace in Sandbox

Assigner: VulnCheck
Reserved: 13.07.2026 Published: 17.07.2026 Updated: 17.07.2026

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.

Metrics

CVSS Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
CVSS Score: 6

Product Status

Vendor getgrav
Product grav
Versions Default: unaffected
  • affected from 0 to 2.0.4 (excl.)
  • Version 2.0.4 is unaffected

Credits

  • gemstone-source reporter
  • drpr0grammer reporter

References

Problem Types

  • Inefficient Regular Expression Complexity CWE