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

- Severity: Medium 6.0 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.30%, higher than 24% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-17T00:07:11.756Z
- Modified: 2026-10-24T20:10:00.137Z
- Also known as: GHSA-37f3-6p89-6qr9
- Related: CVE-2026-62672
- Weaknesses: CWE-1333
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: VulnCheck

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

(As written by CVE List.)

## Affected

- getgrav grav: before 2.0.4 (not affected: 2.0.4)
- getgrav/grav (Packagist): before 2.0.4

## Every score

- VulnCheck: CVSS:4.0 6.0 Medium `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`
- VulnCheck: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 Medium `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`

## References

- <https://github.com/getgrav/grav/security/advisories/GHSA-37f3-6p89-6qr9> (exploit, vendor-advisory, web)
- <https://www.vulncheck.com/advisories/grav-redos-via-regex-replace-in-sandbox> (third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-62672> (advisory)
- <https://github.com/getgrav/grav/commit/907116268ad4f48be7472c57f64981918578599a> (web)
- <https://github.com/getgrav/grav> (package)
- <https://github.com/getgrav/grav/releases/tag/2.0.4> (web)

## Sources

- CVE List: [CVE-2026-62237](https://www.cve.org/CVERecord?id=CVE-2026-62237), CVE Terms of Use, modified 2026-10-08
- GitHub Advisory Database: [GHSA-37f3-6p89-6qr9](https://github.com/advisories/GHSA-37f3-6p89-6qr9), CC-BY-4.0, modified 2026-09-17
- NVD: [CVE-2026-62237](https://nvd.nist.gov/vuln/detail/CVE-2026-62237), Public domain, modified 2026-10-24

---

Page: https://cve.day/CVE-2026-62237 · Whole record: https://cve.day/CVE-2026-62237.json · Rebuilt by cve.day 2026-11-25T22:59:28.465Z
