---
id: CVE-2025-66299
title: Grav is a file-based Web platform
summary: >-
  Grav is a file-based Web platform. Prior to 1.8.0-beta.27, Grav CMS is
  vulnerable to a Server-Side Template Injection (SSTI) that allows any
  authenticated user with editor permissions to execute arbitrary code on the
  remote server, bypas…
severity: high
cvss: 8.8
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-94
  - CWE-1336
vendor: getgrav
product: grav
affected:
  - grav < 1.8.0
  - grav = 1.8.0
patched:
  - grav 1.8.0
published: '2025-12-01'
updated: '2026-09-26'
sourceUpdated: '2026-09-26T00:10:00.127'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2025-66299'
references:
  - url: >-
      https://github.com/getgrav/grav/commit/e37259527d9c1deb6200f8967197a9fa587c6458
    label: security-advisories@github.com
  - url: 'https://github.com/getgrav/grav/security/advisories/GHSA-gjc5-8cfh-653x'
    label: security-advisories@github.com
tags:
  - nvd
epss: 0.00603
epssPercentile: 0.4662
ingestedAt: '2026-09-26T00:22:39.988Z'
---

## Overview

Grav is a file-based Web platform. Prior to 1.8.0-beta.27, Grav CMS is vulnerable to a Server-Side Template Injection (SSTI) that allows any authenticated user with editor permissions to execute arbitrary code on the remote server, bypassing the existing security sandbox. Since the security sandbox does not fully protect the Twig object, it is possible to interact with it (e.g., call methods, read/write attributes) through maliciously crafted Twig template directives injected into a web page. This allows an authenticated editor to add arbitrary functions to the Twig attribute system.twig.safe_filters, effectively bypassing the Grav CMS sandbox. This vulnerability is fixed in 1.8.0-beta.27.

## Affected

- `grav < 1.8.0`
- `grav = 1.8.0`

## Remediation

Upgrade past the affected range:

- `grav 1.8.0`
