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.
Published: 2026-07-17
Score: 6 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability resides in the regex_replace filter and function within Grav, which are allowed in the Twig content sandbox. An authenticated page editor can supply a catastrophic backtracking PCRE pattern that is passed directly to PHP’s preg_replace(), triggering unbounded CPU consumption and a denial of service to the web‑server process. This is a classic regular expression denial of service, identified as CWE‑1333.

Affected Systems

Grav versions prior to 2.0.4 are affected. The flaw is exposed only when Twig content processing is enabled (security.twig_content.process_enabled set to true), a setting that is disabled by default. Consequently, only deployments that have turned on Twig processing and allow page editors to submit content are at risk. Administrators running these configurations with user accounts having page‑editing rights are the scope of the vulnerability.

Risk and Exploitability

The CVSS score of 6 indicates moderate severity, and the EPSS score of less than 1% suggests a low likelihood of exploitation at present. The flaw is not listed in the CISA KEV catalog. The attack requires an authenticated editor with Twig processing enabled; thus the threat is primarily internal. Compromise would result in resource exhaustion and potential service interruption rather than data disclosure or code execution.

Generated by OpenCVE AI on July 31, 2026 at 00:46 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to Grav 2.0.4 or later
  • If an upgrade is not immediately possible, disable Twig content processing by setting security.twig_content.process_enabled to false
  • Restrict page‑editor roles to trusted users and monitor server CPU usage for abnormal spikes

Generated by OpenCVE AI on July 31, 2026 at 00:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 21 Jul 2026 02:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 17 Jul 2026 00:30:00 +0000

Type Values Removed Values Added
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.
Title Grav < 2.0.4 ReDoS via regex_replace in Sandbox
First Time appeared Getgrav
Getgrav grav
Weaknesses CWE-1333
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*
Vendors & Products Getgrav
Getgrav grav
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

cvssV4_0

{'score': 6, '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-21T01:22:52.319Z

Reserved: 2026-07-13T16:41:09.007Z

Link: CVE-2026-62237

cve-icon Vulnrichment

Updated: 2026-07-21T01:22:43.585Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T01:00:14Z

Weaknesses
  • CWE-1333

    Inefficient Regular Expression Complexity