Advisory

GHSA-8535-hvm8-2hmv

Also known as: CVE-2025-66298

Summary

Grav is vulnerable to Server-Side Template Injection (SSTI) via Forms

Details

Summary
Having a simple form on site can reveal the whole Grav configuration details (including plugin configuration details) by using the correct POST payload. Sensitive information may be contained in the configuration details.

PoC
Create a simple form with two fields, 'registration-number' and 'hp'. Add a submit button and set the method to POST(screenshot attached below). Form name set to 'hero-form'. Send a POST request with the following payload and you will notice a response with a php array listing the whole Grav configuration details - including plugins(screenshot attached).

registration-number:d643aaaa

hp:vJyifp

__form-name__:hero-form

__unique_form_id__:{{var_dump(_context|slice(0,7))}}

Screenshot 2025-03-25 at 7 26 02 AM

Screenshot 2025-03-25 at 7 22 58 AM

Impact
Server-Side Template (SST) vulnerability. The vulnerability affects the latest Grav version as of 25th of Match 2025 (1.7.48) with all plugins installed (including forms plugin v.7.4.2) to their latest versions as well.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2025-12-02 01:25 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

getgrav/grav

Packagist · All systems

Affected

  • introduced 0, fixed 1.8.0-beta.27 (ecosystem)

Fixed versions

1.8.0-beta.27

Fix

The export has no generic command for this ecosystem.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences