CVE-2025-66298

EPSS 0.07%

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

Published: 12/2/2025Modified: 12/2/2025

Description

### 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](https://github.com/user-attachments/assets/b92b099b-c07a-4ea2-a3f9-47361ceb9355) ![Screenshot 2025-03-25 at 7 22 58 AM](https://github.com/user-attachments/assets/d9146fd3-5887-4bf8-87d9-78f43ade91c8) ### 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.

Affected packages (1)

CVSS scores

SourceVersionSeverityVector
osvCVSS 4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P

References (4)