Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. getgrav/grav
  4. ›
  5. CVE-2025-66294

CVE-2025-66294: Grav is vulnerable to RCE via SSTI through Twig Sandbox Bypass

December 2, 2025

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.

References

  • github.com/advisories/GHSA-662m-56v4-3r8f
  • github.com/getgrav/grav
  • github.com/getgrav/grav/commit/e37259527d9c1deb6200f8967197a9fa587c6458
  • github.com/getgrav/grav/security/advisories/GHSA-662m-56v4-3r8f
  • nvd.nist.gov/vuln/detail/CVE-2025-66294

Code Behaviors & Features

Detect and mitigate CVE-2025-66294 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.8.0-beta.27

Fixed versions

  • 1.8.0-beta.27

Solution

Upgrade to version 1.8.0-beta.27 or above.

Impact 8.8 HIGH

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

packagist/getgrav/grav/CVE-2025-66294.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 14 Dec 2025 00:19:47 +0000.