---
id: CVE-2025-66294
title: Grav is a file-based Web platform
summary: >-
  Grav is a file-based Web platform. Prior to 1.8.0-beta.27, a Server-Side
  Template Injection (SSTI) vulnerability exists in Grav that allows
  authenticated attackers with editor permissions to execute arbitrary commands
  on the server and, …
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.7.48, < 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-66294'
references:
  - url: >-
      https://github.com/getgrav/grav/commit/e37259527d9c1deb6200f8967197a9fa587c6458
    label: security-advisories@github.com
  - url: 'https://github.com/getgrav/grav/security/advisories/GHSA-662m-56v4-3r8f'
    label: security-advisories@github.com
tags:
  - nvd
  - exploit-available
epss: 0.02818
epssPercentile: 0.85987
exploits:
  metasploit:
    - exploit/multi/http/grav_twig_ssti_sandbox_bypass_rce
  checkedAt: '2026-09-26T00:23:14.517Z'
exploitAvailable: true
ingestedAt: '2026-09-26T00:22:39.986Z'
---

## Overview

Grav is a file-based Web platform. Prior to 1.8.0-beta.27, a Server-Side Template Injection (SSTI) vulnerability exists in Grav that allows authenticated attackers with editor permissions to execute arbitrary commands on the server and, under certain conditions, may also be exploited by unauthenticated attackers. This vulnerability stems from weak regex validation in the cleanDangerousTwig method. This vulnerability is fixed in 1.8.0-beta.27.

## Affected

- `grav >= 1.7.48, < 1.8.0`
- `grav = 1.8.0`

## Remediation

Upgrade past the affected range:

- `grav 1.8.0`
