Vulnerability · Published Jul 17, 2026 · Assigned by VulnCheck

CVE-2026-62237Grav < 2.0.4 ReDoS via regex_replace in Sandbox

Medium 6.5

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.3% (higher than 23% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)0.3%top 77.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Packagistgetgrav/grav2.0.4GHSA-37f3-6p89-6qr9

Affected products (as reported)

VendorProductVersions
getgrav grav 0 – before 2.0.4

Weakness: CWE-1333 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

References